-
Notifications
You must be signed in to change notification settings - Fork 4
/
cloudflare.go
50 lines (43 loc) · 1.04 KB
/
cloudflare.go
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
package model
import (
"github.com/cloudflare/cloudflare-go"
"time"
)
type ZoneAnalyticsColocationResponse struct {
cloudflare.Response
Query struct {
Since time.Time `json:"since"`
Until time.Time `json:"until"`
timeDelta int `json:"time_delta"`
}
Result []cloudflare.ZoneAnalyticsColocation
}
type WAFResponse struct {
cloudflare.Response
ResultInfo ResultInfo `json:"result_info"`
WafTriggers []WafTrigger `json:"result"`
}
type ResultInfo struct {
NextPageId string `json:"next_page_id"`
}
type WafTrigger struct {
Host string `json:"host"`
Action string `json:"action"`
OccurredAt time.Time `json:"occurred_at"`
}
type RateLimitResponse struct {
cloudflare.Response
ResultInfo struct {
Cursors struct {
After string `json:"after"`
Before string `json:"before"`
}
}
Result []RateLimit `json:"result"`
}
type RateLimit struct {
Host string `json:"host"`
Action string `json:"action"`
Method string `json:"method"`
OccurredAt time.Time `json:"occurred_at"`
}