forked from nordcloud/go-pingdom
-
Notifications
You must be signed in to change notification settings - Fork 2
/
api_responses.go
39 lines (32 loc) · 1.25 KB
/
api_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
37
38
39
package pingdomext
import (
"github.com/DrFaust92/go-pingdom/pingdom"
)
type errorJSONResponse struct {
Error *pingdom.PingdomError `json:"error"`
}
type listIntegrationJSONResponse struct {
Integrations []IntegrationGetResponse `json:"integration"`
}
type integrationDetailsJSONResponse struct {
Integration *IntegrationGetResponse `json:"integration"`
}
type integrationJSONResponse struct {
IntegrationStatus *IntegrationStatus `json:"integration"`
}
// IntegrationGetResponse represents the JSON response for a integration from the Pingdom API.
type IntegrationGetResponse struct {
NumberOfConnectedChecks int `json:"number_of_connected_checks"`
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
ProviderID int `json:"provider_id"`
ActivatedAt int `json:"activated_at"`
CreatedAt int `json:"created_at"`
UserData map[string]string `json:"user_data"`
}
// IntegrationStatus represents a general response from the Pingdom integration API.
type IntegrationStatus struct {
ID int `json:"id"`
Status bool `json:"status"`
}