aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/DreamItGetIT/statuscake/responses.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/DreamItGetIT/statuscake/responses.go')
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/responses.go70
1 files changed, 70 insertions, 0 deletions
diff --git a/vendor/github.com/DreamItGetIT/statuscake/responses.go b/vendor/github.com/DreamItGetIT/statuscake/responses.go
new file mode 100644
index 0000000..b9216b7
--- /dev/null
+++ b/vendor/github.com/DreamItGetIT/statuscake/responses.go
@@ -0,0 +1,70 @@
1package statuscake
2
3type autheticationErrorResponse struct {
4 ErrNo int
5 Error string
6}
7
8type updateResponse struct {
9 Issues interface{} `json:"Issues"`
10 Success bool `json:"Success"`
11 Message string `json:"Message"`
12 InsertID int `json:"InsertID"`
13}
14
15type deleteResponse struct {
16 Success bool `json:"Success"`
17 Error string `json:"Error"`
18}
19
20type detailResponse struct {
21 Method string `json:"Method"`
22 TestID int `json:"TestID"`
23 TestType string `json:"TestType"`
24 Paused bool `json:"Paused"`
25 WebsiteName string `json:"WebsiteName"`
26 URI string `json:"URI"`
27 ContactID int `json:"ContactID"`
28 Status string `json:"Status"`
29 Uptime float64 `json:"Uptime"`
30 CheckRate int `json:"CheckRate"`
31 Timeout int `json:"Timeout"`
32 LogoImage string `json:"LogoImage"`
33 Confirmation int `json:"Confirmation,string"`
34 WebsiteHost string `json:"WebsiteHost"`
35 NodeLocations []string `json:"NodeLocations"`
36 FindString string `json:"FindString"`
37 DoNotFind bool `json:"DoNotFind"`
38 LastTested string `json:"LastTested"`
39 NextLocation string `json:"NextLocation"`
40 Port int `json:"Port"`
41 Processing bool `json:"Processing"`
42 ProcessingState string `json:"ProcessingState"`
43 ProcessingOn string `json:"ProcessingOn"`
44 DownTimes int `json:"DownTimes,string"`
45 Sensitive bool `json:"Sensitive"`
46 TriggerRate int `json:"TriggerRate,string"`
47}
48
49func (d *detailResponse) test() *Test {
50 return &Test{
51 TestID: d.TestID,
52 TestType: d.TestType,
53 Paused: d.Paused,
54 WebsiteName: d.WebsiteName,
55 WebsiteURL: d.URI,
56 ContactID: d.ContactID,
57 Status: d.Status,
58 Uptime: d.Uptime,
59 CheckRate: d.CheckRate,
60 Timeout: d.Timeout,
61 LogoImage: d.LogoImage,
62 Confirmation: d.Confirmation,
63 WebsiteHost: d.WebsiteHost,
64 NodeLocations: d.NodeLocations,
65 FindString: d.FindString,
66 DoNotFind: d.DoNotFind,
67 Port: d.Port,
68 TriggerRate: d.TriggerRate,
69 }
70}