-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.go
More file actions
67 lines (58 loc) · 1.88 KB
/
models.go
File metadata and controls
67 lines (58 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package checkhost
type TargetRequest struct {
APIKey string `json:"apikey,omitempty"`
Target string `json:"target"`
}
type DNSTargetRequest struct {
APIKey string `json:"apikey,omitempty"`
Target string `json:"target"`
QueryMethod string `json:"querymethod,omitempty"`
Region []string `json:"region,omitempty"`
}
type MonitoringRequest struct {
APIKey string `json:"apikey,omitempty"`
Target string `json:"target"`
RepeatChecks int `json:"repeatchecks,omitempty"`
Region []string `json:"region,omitempty"`
Timeout int `json:"timeout,omitempty"`
}
type TCPMonitoringRequest struct {
MonitoringRequest
Port int `json:"port"`
}
type UDPMonitoringRequest struct {
MonitoringRequest
Port int `json:"port"`
Payload string `json:"payload,omitempty"`
}
type MTRMonitoringRequest struct {
APIKey string `json:"apikey,omitempty"`
Target string `json:"target"`
RepeatChecks int `json:"repeatchecks,omitempty"`
ForceIPVersion int `json:"forceIPversion,omitempty"`
ForceProtocol string `json:"forceProtocol,omitempty"`
Region []string `json:"region,omitempty"`
}
type MinResponseINFO struct {
IP string `json:"ip"`
Reverse string `json:"reverse"`
IPRange string `json:"iprange"`
Country string `json:"country"`
City string `json:"city"`
Zipcode string `json:"zipcode"`
}
type CheckCreated struct {
Status int `json:"status"`
Target string `json:"target"`
Method string `json:"method"`
RepeatChecks int `json:"repeatchecks"`
UUID string `json:"uuid"`
ReportURL string `json:"reportURL"`
APIURL string `json:"apiURL"`
Message string `json:"message"`
Success bool `json:"success"`
}
// Result mapping generic report data. Real world results return dicts mapped by Node name.
type Report struct {
Nodes map[string]interface{}
}