-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.go
49 lines (42 loc) · 1.03 KB
/
types.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
package main
type Config struct {
Zones string `json:"zones"`
Email string `json:"email"`
APIKey string `json:"apikey"`
A []string `json:"A"`
AAAA []string `json:"AAAA"`
SubNet6 SubNET `json:"subnet6"`
RecordA []CFRecord `json:"-"`
RecordAAAA []CFRecord `json:"-"`
RecordSubNET6 []CFRecord `json:"-"`
SuffixSubNET6 []uint128 `json:"-"`
}
type SubNET struct {
Prefix int `json:"prefix"`
Targets []struct {
Domain string `json:"domain"`
Suffix string `json:"suffix"`
} `json:"targets"`
}
type CFRecord struct {
Name string
RecordID string
}
type ListDnsRecordResp struct {
Success bool `json:"success"`
Result []struct {
Name string `json:"name"`
Id string `json:"id"`
Content string `json:"content"`
} `json:"result"`
}
type UpdateDnsRecordReq struct {
Type string `json:"type"`
Name string `json:"name"`
Content string `json:"content"`
TTL int `json:"ttl"`
Proxied bool `json:"proxied"`
}
type UpdateDnsRecordResp struct {
Success bool `json:"success"`
}