aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/DreamItGetIT/statuscake/tests.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/DreamItGetIT/statuscake/tests.go')
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/tests.go15
1 files changed, 9 insertions, 6 deletions
diff --git a/vendor/github.com/DreamItGetIT/statuscake/tests.go b/vendor/github.com/DreamItGetIT/statuscake/tests.go
index a41b0bd..c6e6dd2 100644
--- a/vendor/github.com/DreamItGetIT/statuscake/tests.go
+++ b/vendor/github.com/DreamItGetIT/statuscake/tests.go
@@ -12,7 +12,7 @@ const queryStringTag = "querystring"
12 12
13// Test represents a statuscake Test 13// Test represents a statuscake Test
14type Test struct { 14type Test struct {
15 // ThiTestID is an int, use this to get more details about this test. If not provided will insert a new check, else will update 15 // TestID is an int, use this to get more details about this test. If not provided will insert a new check, else will update
16 TestID int `json:"TestID" querystring:"TestID" querystringoptions:"omitempty"` 16 TestID int `json:"TestID" querystring:"TestID" querystringoptions:"omitempty"`
17 17
18 // Sent tfalse To Unpause and true To Pause. 18 // Sent tfalse To Unpause and true To Pause.
@@ -33,8 +33,11 @@ type Test struct {
33 // A Port to use on TCP Tests 33 // A Port to use on TCP Tests
34 Port int `json:"Port" querystring:"Port"` 34 Port int `json:"Port" querystring:"Port"`
35 35
36 // Contact group ID - will return int of contact group used else 0 36 // Contact group ID - deprecated in favor of ContactGroup but still provided in the API detail response
37 ContactID int `json:"ContactID" querystring:"ContactGroup"` 37 ContactID int `json:"ContactID"`
38
39 // Contact group IDs - will return list of ints or empty if not provided
40 ContactGroup []string `json:"ContactGroup" querystring:"ContactGroup"`
38 41
39 // Current status at last test 42 // Current status at last test
40 Status string `json:"Status"` 43 Status string `json:"Status"`
@@ -51,7 +54,7 @@ type Test struct {
51 // A URL to ping if a site goes down. 54 // A URL to ping if a site goes down.
52 PingURL string `json:"PingURL" querystring:"PingURL"` 55 PingURL string `json:"PingURL" querystring:"PingURL"`
53 56
54 Confirmation int `json:"Confirmationi,string" querystring:"Confirmation"` 57 Confirmation int `json:"Confirmation,string" querystring:"Confirmation"`
55 58
56 // The number of seconds between checks. 59 // The number of seconds between checks.
57 CheckRate int `json:"CheckRate" querystring:"CheckRate"` 60 CheckRate int `json:"CheckRate" querystring:"CheckRate"`
@@ -93,7 +96,7 @@ type Test struct {
93 TriggerRate int `json:"TriggerRate" querystring:"TriggerRate"` 96 TriggerRate int `json:"TriggerRate" querystring:"TriggerRate"`
94 97
95 // Tags should be seperated by a comma - no spacing between tags (this,is,a set,of,tags) 98 // Tags should be seperated by a comma - no spacing between tags (this,is,a set,of,tags)
96 TestTags string `json:"TestTags" querystring:"TestTags"` 99 TestTags []string `json:"TestTags" querystring:"TestTags"`
97 100
98 // Comma Seperated List of StatusCodes to Trigger Error on (on Update will replace, so send full list each time) 101 // Comma Seperated List of StatusCodes to Trigger Error on (on Update will replace, so send full list each time)
99 StatusCodes string `json:"StatusCodes" querystring:"StatusCodes"` 102 StatusCodes string `json:"StatusCodes" querystring:"StatusCodes"`
@@ -283,7 +286,7 @@ func (tt *tests) Update(t *Test) (*Test, error) {
283 } 286 }
284 287
285 if !ur.Success { 288 if !ur.Success {
286 return nil, &updateError{Issues: ur.Issues} 289 return nil, &updateError{Issues: ur.Issues, Message: ur.Message}
287 } 290 }
288 291
289 t2 := *t 292 t2 := *t