-
Notifications
You must be signed in to change notification settings - Fork 102
/
statuscake-responses.go
36 lines (31 loc) · 1.05 KB
/
statuscake-responses.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
package statuscake
import (
statuscake "github.com/StatusCakeDev/statuscake-go"
)
// StatusCakeMonitor response Structure for GetAll and GetByName API's for Statuscake
type StatusCakeMonitor struct {
StatusCakeData []StatusCakeMonitorData `json:"data"`
StatusCakeMetadata StatusCakeMonitorMetadata `json:"metadata"`
}
type StatusCakeMonitorData struct {
TestID string `json:"id"`
Paused bool `json:"paused"`
WebsiteName string `json:"name"`
WebsiteURL string `json:"website_url"`
TestType string `json:"test_type"`
CheckRate int `json:"check_rate"`
ContactGroup []string `json:"contact_groups"`
Status string `json:"status"`
Tags []string `json:"tags"`
Uptime float64 `json:"uptime"`
}
type StatusCakeMonitorMetadata struct {
Page int `json:"page"`
PerPage int `json:"per_page"`
PageCount int `json:"page_count"`
TotalCount int `json:"total_count"`
}
// TODO use statuscake managed structs, rather than managing own structs
type StatusCakeData struct {
statuscake.UptimeTest
}