-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathincidents_types.go
More file actions
148 lines (137 loc) · 4.74 KB
/
Copy pathincidents_types.go
File metadata and controls
148 lines (137 loc) · 4.74 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
package statusio
import "time"
type Incident struct {
StatuspageID string `json:"statuspage_id"`
IncidentID string `json:"incident_id,omitempty"`
IncidentName string `json:"incident_name,omitempty"`
IncidentDetails string `json:"incident_details"`
MessageSubject string `json:"message_subject,omitempty"`
NotifyEmail string `json:"notify_email"`
NotifySms string `json:"notify_sms"`
NotifyWebhook string `json:"notify_webhook"`
Social string `json:"social"`
Irc string `json:"irc,omitempty"`
Hipchat string `json:"hipchat,omitempty"`
Msteams string `json:"msteams,omitempty"`
Slack string `json:"slack,omitempty"`
CurrentStatus Status `json:"current_status,omitempty"`
CurrentState State `json:"current_state,omitempty"`
AllInfrastructureAffected string `json:"all_infrastructure_affected,omitempty"`
InfrastructureAffected []string `json:"infrastructure_affected"`
}
type IncidentResponse struct {
V int `json:"__v"`
ID string `json:"_id"`
InfrastructureAffected interface{} `json:"infrastructure_affected"`
ComponentsAffected []struct {
V int `json:"__v"`
ID string `json:"_id"`
Position int `json:"position"`
Statuspage string `json:"statuspage"`
Containers []string `json:"containers"`
Name string `json:"name"`
} `json:"components_affected"`
ContainersAffected []struct {
V int `json:"__v"`
ID string `json:"_id"`
Name string `json:"name"`
Location string `json:"location"`
} `json:"containers_affected"`
DatetimeOpen time.Time `json:"datetime_open"`
Kind string `json:"kind"`
Messages []struct {
Details string `json:"details"`
Source string `json:"source"`
State State `json:"state"`
Status Status `json:"status"`
Statuspage string `json:"statuspage"`
Incident string `json:"incident"`
IP string `json:"ip"`
ID string `json:"_id"`
V int `json:"__v"`
Datetime time.Time `json:"datetime"`
Containers []string `json:"containers"`
Components []string `json:"components"`
} `json:"messages"`
Name string `json:"name"`
PostMortemUrl string `json:"post_mortem_url"`
Statuspage string `json:"statuspage"`
}
type IncidentListResponse struct {
Status struct {
Error string `json:"error"`
Message string `json:"message"`
} `json:"status"`
Result struct {
ActiveIncidents []IncidentResponse `json:"active_incidents"`
ResolvedIncidents []IncidentResponse `json:"resolved_incidents"`
} `json:"result"`
}
type IncidentListByIDResponse struct {
Status struct {
Error string `json:"error"`
Message string `json:"message"`
} `json:"status"`
Result struct {
ActiveIncidents []string `json:"active_incidents"`
ResolvedIncidents []string `json:"resolved_incidents"`
} `json:"result"`
}
type IncidentSingleResponse struct {
Status struct {
Error string `json:"error"`
Message string `json:"message"`
} `json:"status"`
Result []IncidentResponse `json:"result"`
}
type IncidentMessageResponse struct {
Status struct {
Error string `json:"error"`
Message string `json:"message"`
} `json:"status"`
Result struct {
UserEmail string `json:"user_email"`
UserFullName string `json:"user_full_name"`
Details string `json:"details"`
Source string `json:"source"`
Social string `json:"social"`
State State `json:"state"`
Status Status `json:"status"`
Statuspage string `json:"statuspage"`
Incident string `json:"incident"`
IP string `json:"ip"`
ID string `json:"_id"`
V int `json:"__v"`
Datetime time.Time `json:"datetime"`
Containers []string `json:"containers"`
Components []string `json:"components"`
} `json:"result"`
}
type IncidentCreateResponse struct {
Status struct {
Error string `json:"error"`
Message string `json:"message"`
} `json:"status"`
Result string `json:"result"`
}
type IncidentUpdateResponse struct {
Status struct {
Error string `json:"error"`
Message string `json:"message"`
} `json:"status"`
Result bool `json:"result"`
}
type IncidentResolveResponse struct {
Status struct {
Error string `json:"error"`
Message string `json:"message"`
} `json:"status"`
Result bool `json:"result"`
}
type IncidentDeleteResponse struct {
Status struct {
Error string `json:"error"`
Message string `json:"message"`
} `json:"status"`
Result bool `json:"result"`
}