-
Notifications
You must be signed in to change notification settings - Fork 4
/
structs.go
123 lines (109 loc) · 2.41 KB
/
structs.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
package main
import (
"net/http"
"time"
)
type cddnsContext struct {
HttpClient *http.Client
Config config
CurrentIPAddress string
}
type cloudflareMetadata struct {
auto_added bool
}
type cloudflareDNSRecord struct {
Id string
RecordType string `json:"type"`
Name string
Content string
Proxiable bool
Proxied bool
Ttl int
Locked bool
Zone_id string
Zone_name string
Created_on time.Time
Modified_on time.Time
Data interface{}
Meta cloudflareMetadata
Priority int
}
type cloudflarePlan struct {
Id string
Name string
Price int
Currency string
Frequency string
Legacy_id string
Is_subscribed bool
Can_subscribe bool
}
type host struct {
Name string
Website string
}
type cloudflareZone struct {
Id string
Name string
Development_mode int
Original_name_servers []string
Original_registrar string
Original_dnshost string
Created_on time.Time
Modified_on time.Time
Name_servers []string
Owner interface{}
Permissions []string
Plan cloudflarePlan
Plan_pending cloudflarePlan
Status string
Paused bool
Type string
Checked_on time.Time
Host host
Vanity_name_servers []string
Betas []string
Deactivation_reason string
Meta interface{}
}
type cloudflareResultInfo struct {
Page int
Per_page int
Count int
Total_count int
}
type cloudflareResponse struct {
Success bool
Errors []string
Messages []string
Result_info cloudflareResultInfo
}
type cloudflareZoneResponse struct {
cloudflareResponse
Result []cloudflareZone
}
type cloudflareDNSResponse struct {
cloudflareResponse
Result []cloudflareDNSRecord
}
type cloudflareDNSUpdateResponse struct {
cloudflareResponse
Result cloudflareDNSRecord
}
type newCloudflareDNSRecord struct {
Type dnsType `json:"type"`
Name string `json:"name"`
Content string `json:"content"`
Proxied bool `json:"proxied"`
TTL int `json:"ttl"`
}
type config struct {
UpdateInterval int
Key string
Email string
DomainName string
ZoneID string
RecordNames []string
Remove bool
CloudflareURL string
}