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.go56
1 files changed, 37 insertions, 19 deletions
diff --git a/vendor/github.com/DreamItGetIT/statuscake/responses.go b/vendor/github.com/DreamItGetIT/statuscake/responses.go
index b9216b7..9cdcb11 100644
--- a/vendor/github.com/DreamItGetIT/statuscake/responses.go
+++ b/vendor/github.com/DreamItGetIT/statuscake/responses.go
@@ -1,5 +1,9 @@
1package statuscake 1package statuscake
2 2
3import (
4 "strings"
5)
6
3type autheticationErrorResponse struct { 7type autheticationErrorResponse struct {
4 ErrNo int 8 ErrNo int
5 Error string 9 Error string
@@ -24,9 +28,11 @@ type detailResponse struct {
24 Paused bool `json:"Paused"` 28 Paused bool `json:"Paused"`
25 WebsiteName string `json:"WebsiteName"` 29 WebsiteName string `json:"WebsiteName"`
26 URI string `json:"URI"` 30 URI string `json:"URI"`
27 ContactID int `json:"ContactID"` 31 ContactID string `json:"ContactID"`
28 Status string `json:"Status"` 32 Status string `json:"Status"`
29 Uptime float64 `json:"Uptime"` 33 Uptime float64 `json:"Uptime"`
34 CustomHeader string `json:"CustomHeader"`
35 UserAgent string `json:"UserAgent"`
30 CheckRate int `json:"CheckRate"` 36 CheckRate int `json:"CheckRate"`
31 Timeout int `json:"Timeout"` 37 Timeout int `json:"Timeout"`
32 LogoImage string `json:"LogoImage"` 38 LogoImage string `json:"LogoImage"`
@@ -44,27 +50,39 @@ type detailResponse struct {
44 DownTimes int `json:"DownTimes,string"` 50 DownTimes int `json:"DownTimes,string"`
45 Sensitive bool `json:"Sensitive"` 51 Sensitive bool `json:"Sensitive"`
46 TriggerRate int `json:"TriggerRate,string"` 52 TriggerRate int `json:"TriggerRate,string"`
53 UseJar int `json:"UseJar"`
54 PostRaw string `json:"PostRaw"`
55 FinalEndpoint string `json:"FinalEndpoint"`
56 FollowRedirect bool `json:"FollowRedirect"`
57 StatusCodes []string `json:"StatusCodes"`
47} 58}
48 59
49func (d *detailResponse) test() *Test { 60func (d *detailResponse) test() *Test {
50 return &Test{ 61 return &Test{
51 TestID: d.TestID, 62 TestID: d.TestID,
52 TestType: d.TestType, 63 TestType: d.TestType,
53 Paused: d.Paused, 64 Paused: d.Paused,
54 WebsiteName: d.WebsiteName, 65 WebsiteName: d.WebsiteName,
55 WebsiteURL: d.URI, 66 WebsiteURL: d.URI,
56 ContactID: d.ContactID, 67 CustomHeader: d.CustomHeader,
57 Status: d.Status, 68 UserAgent: d.UserAgent,
58 Uptime: d.Uptime, 69 ContactID: d.ContactID,
59 CheckRate: d.CheckRate, 70 Status: d.Status,
60 Timeout: d.Timeout, 71 Uptime: d.Uptime,
61 LogoImage: d.LogoImage, 72 CheckRate: d.CheckRate,
62 Confirmation: d.Confirmation, 73 Timeout: d.Timeout,
63 WebsiteHost: d.WebsiteHost, 74 LogoImage: d.LogoImage,
64 NodeLocations: d.NodeLocations, 75 Confirmation: d.Confirmation,
65 FindString: d.FindString, 76 WebsiteHost: d.WebsiteHost,
66 DoNotFind: d.DoNotFind, 77 NodeLocations: d.NodeLocations,
67 Port: d.Port, 78 FindString: d.FindString,
68 TriggerRate: d.TriggerRate, 79 DoNotFind: d.DoNotFind,
80 Port: d.Port,
81 TriggerRate: d.TriggerRate,
82 UseJar: d.UseJar,
83 PostRaw: d.PostRaw,
84 FinalEndpoint: d.FinalEndpoint,
85 FollowRedirect: d.FollowRedirect,
86 StatusCodes: strings.Join(d.StatusCodes[:], ","),
69 } 87 }
70} 88}