-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtypes.go
More file actions
57 lines (47 loc) · 1.3 KB
/
types.go
File metadata and controls
57 lines (47 loc) · 1.3 KB
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
package wedos
import "encoding/json"
type request struct {
User string `json:"user"`
Auth string `json:"auth"`
Command string `json:"command"`
ClTRID string `json:"clTRID"`
Test string `json:"test,omitempty"`
Data json.RawMessage `json:"data,omitempty"`
}
type requestEnvelope struct {
Request request `json:"request"`
}
type response struct {
Code int `json:"code"`
Result string `json:"result"`
Timestamp uint `json:"timestamp"`
ClTRID string `json:"clTRID"`
SvTRID string `json:"svTRID"`
Command string `json:"command"`
Data json.RawMessage `json:"data,omitempty"`
}
type responseEnvelope struct {
Response response `json:"response"`
}
type dnsRowsListResponse struct {
Row row `json:"row"`
}
type row []rowItem
type rowItem struct {
ID string `json:"ID"`
Name string `json:"name"`
TTL string `json:"ttl"`
Rdtype string `json:"rdtype"`
Rdata string `json:"rdata"`
ChangedDate string `json:"changed_date"`
AuthorComment string `json:"author_comment"`
}
type dnsAppendResponse struct {
Domain string `json:"domain"`
ID string `json:"row_id"`
}
type recordKey struct {
Name string
Type string
Data string
}