forked from libdns/libdns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.go
35 lines (29 loc) · 1005 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
32
33
34
35
package dnsexit
type Action int64
const (
Set Action = iota
Append
Delete
)
type dnsExitPayload struct {
Apikey string `json:"apikey"`
Zone string `json:"domain"`
AddRecords *[]dnsExitRecord `json:"add,omitempty"`
DeleteRecords *[]dnsExitRecord `json:"delete,omitempty"`
}
// TODO - look at co-ercing properties of LibDns mx records into MailZone/MailServer properties
// MailZone string `json:"mail-zone,omitempty"` // "mail-zone":"",
// MailServer string `json:"mail-server,omitempty"` // "mail-server":"mail2.dnsexit.com",
type dnsExitRecord struct {
Type string `json:"type"`
Name string `json:"name,omitempty"`
Content *string `json:"content,omitempty"`
Priority *int `json:"priority,omitempty"`
TTL *int `json:"ttl,omitempty"`
Overwrite *bool `json:"overwrite,omitempty"`
}
type dnsExitResponse struct {
Code int `json:"code"`
Details []string `json:"details"`
Message string `json:"message"`
}