-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
31 lines (27 loc) · 918 Bytes
/
models.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
package namecheap
import "encoding/xml"
type Config struct {
User string `json:"user"`
ApiKey string `json:"api_key"`
IP string `json:"ip"`
}
type Host struct {
XMLName xml.Name `xml:"host"`
HostId string `xml:"HostId"`
Name string `xml:"Name"`
Type string `xml:"Type"`
Address string `xml:"Address"`
MXPref string `xml:"MXPref"`
TTL int `xml:"TTL"`
AssociatedAppTitle string `xml:"AssociatedAppTitle"`
FriendlyName string `xml:"FriendlyName"`
IsActive bool `xml:"IsActive"`
IsDDNSEnabled bool `xml:"IsDDNSEnabled"`
}
type Hosts struct {
XMLName xml.Name `xml:"hosts"`
Domain string `xml:"Domain,attr"`
EmailType string `xml:"EmailType,attr"`
IsUsingOurDNS bool `xml:"IsUsingOurDNS,attr"`
Hosts []Host `xml:"Host"`
}