-
Notifications
You must be signed in to change notification settings - Fork 2
/
structures.go
72 lines (64 loc) · 1.73 KB
/
structures.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
package main
import (
"encoding/xml"
)
type NicruTokens struct {
RefreshToken string `json:"refresh_token"`
ExpiresIn int `json:"expires_in"`
AccessToken string `json:"access_token"`
TokenType string `json:"token_type"`
}
type Request struct {
XMLName xml.Name `xml:"request"`
Text string `xml:",chardata"`
RrList *RrList `xml:"rr-list"`
}
type RrList struct {
Text string `xml:",chardata"`
Rr []*Rr `xml:"rr"`
}
type Rr struct {
Text string `xml:",chardata"`
ID string `xml:"id,attr,omitempty"`
Name string `xml:"name"`
TTL int `xml:"ttl"`
Type string `xml:"type"`
Txt *TxtRecord `xml:"txt"`
}
type TxtRecord struct {
Text string `xml:",chardata" json:"text,omitempty"`
String string `xml:"string" json:"string,omitempty"`
}
type Response struct {
XMLName xml.Name `xml:"response"`
Text string `xml:",chardata"`
Status string `xml:"status"`
Errors struct {
Text string `xml:",chardata"`
Error struct {
Text string `xml:",chardata"`
Code string `xml:"code,attr"`
} `xml:"error"`
} `xml:"errors"`
}
type Zone struct {
XMLName xml.Name `xml:"response"`
Text string `xml:",chardata"`
Status string `xml:"status"`
Data struct {
Text string `xml:",chardata"`
Zone []struct {
Text string `xml:",chardata"`
Admin string `xml:"admin,attr"`
Enable string `xml:"enable,attr"`
HasChanges string `xml:"has-changes,attr"`
HasPrimary string `xml:"has-primary,attr"`
ID string `xml:"id,attr"`
IdnName string `xml:"idn-name,attr"`
Name string `xml:"name,attr"`
Payer string `xml:"payer,attr"`
Service string `xml:"service,attr"`
RR []*Rr `xml:"rr"`
} `xml:"zone"`
} `xml:"data"`
}