]>
Commit | Line | Data |
---|---|---|
9b12e4fe JC |
1 | package statuscake |
2 | ||
3 | type autheticationErrorResponse struct { | |
4 | ErrNo int | |
5 | Error string | |
6 | } | |
7 | ||
8 | type updateResponse struct { | |
9 | Issues interface{} `json:"Issues"` | |
10 | Success bool `json:"Success"` | |
11 | Message string `json:"Message"` | |
12 | InsertID int `json:"InsertID"` | |
13 | } | |
14 | ||
15 | type deleteResponse struct { | |
16 | Success bool `json:"Success"` | |
17 | Error string `json:"Error"` | |
18 | } | |
19 | ||
20 | type 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 | ||
49 | func (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 | } |