-
Notifications
You must be signed in to change notification settings - Fork 0
/
message.go
35 lines (27 loc) · 1021 Bytes
/
message.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package matterhook
type Message struct {
Text string `json:"text"`
Username string `json:"username,omitempty"`
IconEmoji string `json:"icon_emoji,omitempty"`
Channel string `json:"channel,omitempty"`
Attachments []Attachment `json:"attachments,omitempty"`
}
type Attachment struct {
Text string `json:"text,omitempty"`
Fallback string `json:"fallback,omitempty"`
Pretext string `json:"pretext,omitempty"`
Color string `json:"color,omitempty"`
AuthorName string `json:"author_name,omitempty"`
AuthorLink string `json:"author_link,omitempty"`
AuthorIcon string `json:"author_icon,omitempty"`
Title string `json:"title,omitempty"`
TitleLink string `json:"title_link,omitempty"`
Fields []Field `json:"fields,omitempty"`
ImageURL string `json:"image_url,omitempty"`
ThumbURL string `json:"thumb_url,omitempty"`
}
type Field struct {
Title string `json:"title,omitempty"`
Value string `json:"value,omitempty"`
Short bool `json:"short,omitempty"`
}