Debian Codegraph @

dynect/records.go

raw symbols SCIP
1 package dynect
2
3 // Type AllRecordsResponse is a struct for holding a list of all URIs returned
4 // from an HTTP GET call to either https://api.dynect.net/REST/AllRecord/<zone>
5 // or https://api/dynect.net/REST/AllRecord/<zone>/<FQDN>/.
6 type AllRecordsResponse struct {
7 ResponseBlock
8 Data []string `json:"data"`
9 }
10
11 // Type RecordResponse is used to hold the information for a single DNS record
12 // returned from Dyn's DynECT API.
13 type RecordResponse struct {
14 ResponseBlock
15 Data BaseRecord `json:"data"`
16 }
17
18 /*
19 The base struct for record data returned from the Dyn REST API.
20
21 It should never be directly passed to the *Client.Do() function for marshaling
22 response data to. Instead, it should aid in the composition of a more-specific
23 response struct.
24 */
25 type BaseRecord struct {
26 FQDN string `json:"fqdn"`
27 RecordId int `json:"record_id"`
28 RecordType string `json:"record_type"`
29 TTL int `json:"ttl"`
30 Zone string `json:"zone"`
31 RData DataBlock `json:"rdata"`
32 }
33
34 // Type DataBlock is nested within the BaseRecord struct, and is used for
35 // holding record information.
36 //
37 // The comment above each field indicates which record types you can expect
38 // the information to be provided.
39 type DataBlock struct {
40 // A, AAAA
41 Address string `json:"address,omitempty" bson:"address,omitempty"`
42
43 // ALIAS
44 Alias string `json:"alias,omitempty" bson:"alias,omitempty"`
45
46 // CERT, DNSKEY, DS, IPSECKEY, KEY, SSHFP
47 Algorithm string `json:"algorithm,omitempty" bson:"algorithm,omitempty"`
48
49 // LOC
50 Altitude string `json:"altitude,omitempty" bson:"altitude,omitempty"`
51
52 // CNAME
53 CName string `json:"cname,omitempty" bson:"cname,omitempty"`
54
55 // CERT
56 Certificate string `json:"certificate,omitempty" bson:"algorithm,omitempty"`
57
58 // DNAME
59 DName string `json:"dname,omitempty" bson:"dname,omitempty"`
60
61 // DHCID, DS
62 Digest string `json:"digest,omitempty" bson:"digest,omitempty"`
63
64 // DS
65 DigestType string `json:"digtype,omitempty" bson:"digest_type,omitempty"`
66
67 // KX, MX
68 Exchange string `json:"exchange,omitempty" bson:"exchange,omitempty"`
69
70 // SSHFP
71 FPType string `json:"fptype,omitempty" bson:"fp_type,omitempty"`
72
73 // SSHFP
74 Fingerprint string `json:"fingerprint,omitempty" bson:"fingerprint,omitempty"`
75
76 // DNSKEY, KEY, NAPTR
77 Flags string `json:"flags,omitempty" bson:"flags,omitempty"`
78
79 // CERT
80 Format string `json:"format,omitempty" bson:"format,omitempty"`
81
82 // IPSECKEY
83 GatewayType string `json:"gatetype,omitempty" bson:"gateway_type,omitempty"`
84
85 // LOC
86 HorizPre string `json:"horiz_pre,omitempty" bson:"horiz_pre,omitempty"`
87
88 // DS
89 KeyTag string `json:"keytag,omitempty" bson:"keytag,omitempty"`
90
91 // LOC
92 Latitude string `json:"latitude,omitempty" bson:"latitude,omitempty"`
93
94 // LOC
95 Longitude string `json:"longitude,omitempty" bson:"longitude,omitempty"`
96
97 // PX
98 Map822 string `json:"map822,omitempty" bson:"map_822,omitempty"`
99
100 // PX
101 MapX400 string `json:"mapx400,omitempty" bson:"map_x400,omitempty"`
102
103 // RP
104 Mbox string `json:"mbox,omitempty" bson:"mbox,omitempty"`
105
106 // NS
107 NSDName string `json:"nsdname,omitempty" bson:"nsdname,omitempty"`
108
109 // NSAP
110 NSAP string `json:"nsap,omitempty" bson:"nsap,omitempty"`
111
112 // NAPTR
113 Order string `json:"order,omitempty" bson:"order,omitempty"`
114
115 // SRV
116 Port int `json:"port,omitempty" bson:"port,omitempty"`
117
118 // IPSECKEY
119 Precendence string `json:"precendence,omitempty" bson:"precendence,omitempty"`
120
121 // KX, MX, NAPTR, PX
122 Preference int `json:"preference,omitempty" bson:"preference,omitempty"`
123
124 // SRV
125 Priority int `json:"priority,omitempty" bson:"priority,omitempty"`
126
127 // DNSKEY, KEY
128 Protocol string `json:"protocol,omitempty" bson:"protocol,omitempty"`
129
130 // PTR
131 PTRDname string `json:"ptrdname,omitempty" bson:"ptrdname,omitempty"`
132
133 // DNSKEY, IPSECKEY, KEY
134 PublicKey string `json:"public_key,omitempty" bson:"public_key,omitempty"`
135
136 // NAPTR
137 Regexp string `json:"regexp,omitempty" bson:"regexp,omitempty"`
138
139 // NAPTR
140 Replacement string `json:"replacement,omitempty" bson:"replacement,omitempty"`
141
142 // SOA
143 RName string `json:"rname,omitempty" bson:"rname,omitempty"`
144
145 // NAPTR
146 Services string `json:"services,omitempty" bson:"services,omitempty"`
147
148 // LOC
149 Size string `json:"size,omitempty" bson:"size,omitempty"`
150
151 // CERT
152 Tag string `json:"tag,omitempty" bson:"tag,omitempty"`
153
154 // SRV
155 Target string `json:"target,omitempty" bson:"target,omitempty"`
156
157 // RP
158 TxtDName string `json:"txtdname,omitempty" bson:"txtdname,omitempty"`
159
160 // SPF, TXT
161 TxtData string `json:"txtdata,omitempty" bson:"txtdata,omitempty"`
162
163 // LOC
164 Version string `json:"version,omitempty" bson:"version,omitempty"`
165
166 // LOC
167 VertPre string `json:"vert_pre,omitempty" bson:"vert_pre,omitempty"`
168
169 // SRV
170 Weight int `json:"weight,omitempty" bson:"weight,omitempty"`
171 }