-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmodels.go
30 lines (26 loc) · 875 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
package leaseweb
// Structs for easy json marshalling.
// Only declare fields that are used.
type leasewebRecordSet struct {
Name string `json:"name"`
Type string `json:"type"`
Content []string `json:"content"`
TTL int `json:"ttl"`
}
type leasewebRecordSets struct {
ResourceRecordSets []leasewebRecordSet `json:"resourceRecordSets"`
}
// Errors
type leasewebHttpError struct {
ErrorMessage string `json:"errorMessage"`
UserMessage string `json:"userMessage"`
CorrelationId string `json:"correlationId"`
// Its not a string but an json object.
ErrorDetails string `json:"errorDetails"`
}
// updateRecordSet
// https://developer.leaseweb.com/api-docs/domains_v2.html#operation/put/domains/{domainName}/resourceRecordSets/{name}/{type}
type updateRecordSetRequest struct {
Content []string `json:"content"`
TTL int `json:"ttl"`
}