-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels_slack.go
65 lines (54 loc) · 1.59 KB
/
models_slack.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package jwb
type SlackAttachmentPayloadWebhook struct {
Attachments []SlackAttachment `json:"attachments"`
}
type SlackMessagePayloadWebhook struct {
Block []SlackBlock `json:"blocks"`
}
type SlackAttachment struct {
Color string `json:"color,omitempty"`
Blocks []SlackBlock `json:"blocks"`
}
type SlackBlock struct {
Type string `json:"type"`
Text *SlackText `json:"text,omitempty"`
Title *SlackTitle `json:"title,omitempty"`
ImageUrl string `json:"image_url,omitempty"`
AltText string `json:"alt_text,omitempty"`
Fields []SlackField `json:"fields,omitempty"`
Accessory *SlackAccessory `json:"accessory,omitempty"`
Elements []SlackElement `json:"elements,omitempty"`
}
type SlackField struct {
Type string `json:"type"`
Text string `json:"text"`
}
type SlackText struct {
Type string `json:"type,omitempty"`
Text string `json:"text,omitempty"`
}
type SlackTitle struct {
Type string `json:"type"`
Text string `json:"text"`
Emoji bool `json:"emoji"`
}
type SlackAccessory struct {
Type string `json:"type"`
Text *SlackAccessoryText `json:"text,omitempty"`
}
type SlackAccessoryText struct {
Type string `json:"type,omitempty"`
Text string `json:"text,omitempty"`
Emoji bool `json:"emoji,omitempty"`
}
type SlackElement struct {
Type string `json:"type"`
Text SlackElementText `json:"text"`
Style string `json:"style"`
Url string `json:"value"`
}
type SlackElementText struct {
Type string `json:"type"`
Text string `json:"text"`
Emoji bool `json:"emoji"`
}