-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtypes.go
63 lines (51 loc) · 1.68 KB
/
types.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
package main
type SquadcastErrorResponse struct {
Meta SquadcastErrorDetails `json:"meta"`
}
type SquadcastErrorDetails struct {
Status int `json:"status"`
ErrorMessage string `json:"error_message"`
}
type AccessTokenResponse struct {
Data AccessTokenDetails `json:"data"`
}
type AccessTokenDetails struct {
AccessToken string `json:"access_token"`
}
type SchedulesResponse struct {
Data []SchedulesDetails `json:"data"`
}
type SchedulesDetails struct {
ID string `json:"id"`
Name string `json:"name"`
}
type OnCallResponse struct {
Data OnCallDetails `json:"data"`
}
type OnCallDetails struct {
ShiftType string `json:"shift_type"`
Users []UserDetails `json:"users"`
}
type UserDetails struct {
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
}
type SlackWebhookRequest struct {
Text string `json:"text,omitempty"`
Channel string `json:"channel,omitempty"`
Username string `json:"username,omitempty"`
IconURL string `json:"icon_url,omitempty"`
IconEmoji string `json:"icon_emoji,omitempty"`
Attachments []SlackWebhookAttachment `json:"attachments,omitempty"`
}
type SlackWebhookAttachment struct {
Fallback string `json:"fallback,omitempty"`
Pretext string `json:"pretext,omitempty"`
Color string `json:"color,omitempty"`
Fields []SlackWebhookAttachmentFields `json:"fields,omitempty"`
}
type SlackWebhookAttachmentFields struct {
Title string `json:"title,omitempty"`
Value string `json:"value,omitempty"`
Short bool `json:"short,omitempty"`
}