diff options
author | Alexander Kiryukhin <alexander@kiryukhin.su> | 2019-02-01 01:20:38 +0300 |
---|---|---|
committer | Alexander Kiryukhin <alexander@kiryukhin.su> | 2019-02-01 01:20:38 +0300 |
commit | 8c499a32b7bb614814da84bace3f3e924be92465 (patch) | |
tree | 3bc9d97a01fdb6e4bf219d5de81f1873232fe696 /requests.go | |
parent | fc9aefc97d872ec8faed767a7b9e2a89ee8630f0 (diff) |
fixes
Diffstat (limited to 'requests.go')
-rw-r--r-- | requests.go | 40 |
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"` +} |