summaryrefslogtreecommitdiff
path: root/requests.go
diff options
context:
space:
mode:
Diffstat (limited to 'requests.go')
-rw-r--r--requests.go40
1 files changed, 40 insertions, 0 deletions
diff --git a/requests.go b/requests.go
new file mode 100644
index 0000000..f8fa98d
--- /dev/null
+++ b/requests.go
@@ -0,0 +1,40 @@
+package main
+
+type payload struct {
+ Type string `json:"type" form:"type"`
+ Token string `json:"token"`
+ ActionTS string `json:"action_ts"`
+ Team struct {
+ ID string `json:"id"`
+ Domain string `json:"domain"`
+ }
+ User struct {
+ ID string `json:"id"`
+ Name string `json:"name"`
+ } `json:"user"`
+ Channel struct {
+ ID string `json:"id"`
+ Name string `json:"name"`
+ } `json:"channel"`
+ CallbackID string `json:"callback_id"`
+ TriggerID string `json:"trigger_id"`
+ MessageTS string `json:"message_ts"`
+ Message struct {
+ ClientMsgID string `json:"client_msg_id"`
+ Type string `json:"type"`
+ Text string `json:"text"`
+ User string `json:"user"`
+ TS string `json:"ts"`
+ } `json:"message"`
+ ResponseUrl string `json:"response_url"`
+}
+
+type message struct {
+ Text string `json:"text"`
+ ResponseType string `json:"response_type"`
+ Attachments []attachment `json:"attachments"`
+}
+type attachment struct {
+ Color string `json:"color"`
+ Text string `json:"text"`
+}