-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmonitor.go
35 lines (31 loc) · 1.35 KB
/
monitor.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 cronitor
import "time"
type MonitorRequest struct {
Monitors []Monitor `json:"monitors"`
}
type Monitor struct {
Key string `json:"key"`
Type string `json:"type"`
Name string `json:"name,omitempty"`
Assertions []string `json:"assertions,omitempty"`
FailureTolerance int `json:"failure_tolerance,omitempty"`
GraceSeconds int `json:"grace_seconds,omitempty"`
Group string `json:"group,omitempty"`
Note string `json:"note,omitempty"`
Notify []string `json:"notify,omitempty"`
Platform string `json:"platform,omitempty"`
RealertInterval string `json:"realert_interval,omitempty"`
Request interface{} `json:"request,omitempty"`
Schedule string `json:"schedule,omitempty"`
ScheduleTolerance int `json:"schedule_tolerance,omitempty"`
Timezone string `json:"timezone,omitempty"`
Tags []string `json:"tags,omitempty"`
Metadata string `json:"metadata,omitempty"`
// Read-Only attributes
Created time.Time `json:"created"`
Disabled bool `json:"disabled"`
Initialized bool `json:"initialized"`
Passing bool `json:"passing"`
Paused bool `json:"paused"`
Running bool `json:"running"`
}