-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
39 lines (36 loc) · 1.38 KB
/
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
36
37
38
39
package easydns
// ZoneRecordResponse is the response from the EasyDNS API for a zone record request.
type ZoneRecordResponse struct {
Timestamp int `json:"tm,omitempty"` // Result Timestamp
Data []struct {
Id string `json:"id,omitempty"`
Domain string `json:"domain,omitempty"`
Host string `json:"host,omitempty"`
TTL string `json:"ttl,omitempty"`
Priority string `json:"prio,omitempty"`
Type string `json:"type,omitempty"`
Rdata string `json:"rdata,omitempty"`
LastModified string `json:"last_mod,omitempty"`
} `json:"data,omitempty"`
Count int `json:"count,omitempty"`
Total int `json:"total,omitempty"`
Start int `json:"start,omitempty"`
Max int `json:"max,omitempty"`
Status int `json:"status,omitempty"`
}
// AddEntry is the request body for adding a record to a zone (PUT request)
type AddEntry struct {
Domain string `json:"domain,omitempty"`
Host string `json:"host,omitempty"`
TTL int `json:"ttl,omitempty"`
Priority int `json:"prio,omitempty"`
Type string `json:"type,omitempty"`
Rdata string `json:"rdata,omitempty"`
}
// UpdateEntry is the request body for updating a record in a zone (POST request)
type UpdateEntry struct {
Host string `json:"host,omitempty"`
TTL int `json:"ttl,omitempty"`
Type string `json:"type,omitempty"`
Rdata string `json:"rdata,omitempty"`
}