X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=vendor%2Fgithub.com%2FDreamItGetIT%2Fstatuscake%2Ftests.go;h=b003d4cb1478f0736e4bbf7f9726f9fb9cb5cff3;hb=ccc9fb69b8f1ebaaf871ad1561052d84a9ccd3a5;hp=a41b0bd78576b326983d1fdda3e1d0c13eccfa96;hpb=a6ddc0c931c22051c2f072877a1e0b18a939ef2e;p=github%2Ffretlink%2Fterraform-provider-statuscake.git 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" // Test represents a statuscake Test type Test struct { - // ThiTestID is an int, use this to get more details about this test. If not provided will insert a new check, else will update + // TestID is an int, use this to get more details about this test. If not provided will insert a new check, else will update TestID int `json:"TestID" querystring:"TestID" querystringoptions:"omitempty"` // Sent tfalse To Unpause and true To Pause. @@ -33,8 +33,11 @@ type Test struct { // A Port to use on TCP Tests Port int `json:"Port" querystring:"Port"` - // Contact group ID - will return int of contact group used else 0 - ContactID int `json:"ContactID" querystring:"ContactGroup"` + // Contact group ID - deprecated in favor of ContactGroup but still provided in the API detail response + ContactID int `json:"ContactID"` + + // Contact group IDs - will return list of ints or empty if not provided + ContactGroup []string `json:"ContactGroup" querystring:"ContactGroup"` // Current status at last test Status string `json:"Status"` @@ -93,7 +96,7 @@ type Test struct { TriggerRate int `json:"TriggerRate" querystring:"TriggerRate"` // Tags should be seperated by a comma - no spacing between tags (this,is,a set,of,tags) - TestTags string `json:"TestTags" querystring:"TestTags"` + TestTags []string `json:"TestTags" querystring:"TestTags"` // Comma Seperated List of StatusCodes to Trigger Error on (on Update will replace, so send full list each time) StatusCodes string `json:"StatusCodes" querystring:"StatusCodes"` @@ -283,7 +286,7 @@ func (tt *tests) Update(t *Test) (*Test, error) { } if !ur.Success { - return nil, &updateError{Issues: ur.Issues} + return nil, &updateError{Issues: ur.Issues, Message: ur.Message} } t2 := *t