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.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/vendor/github.com/DreamItGetIT/statuscake/tests.go b/vendor/github.com/DreamItGetIT/statuscake/tests.go
index a41b0bd..b003d4c 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"`
@@ -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