1package network 2 3import ( 4 liquidweb "github.com/liquidweb/liquidweb-go" 5 "github.com/liquidweb/liquidweb-go/types" 6) 7 8// DNSRecordParams is the set of parameters used when creating or updating a DNS record. 9type DNSRecordParams struct { 10 ID int `json:"id,omitempty"` 11 Name string `json:"name,omitempty"` 12 Prio int `json:"prio,omitempty"` 13 RData string `json:"rdata,omitempty"` 14 TTL int `json:"ttl,omitempty"` 15 Type string `json:"type,omitempty"` 16 Zone string `json:"zone,omitempty"` 17 ZoneID int `json:"zone_id,omitempty"` 18 AdminEmail string `json:"adminEmail,omitempty"` 19 Created string `json:"created,omitempty"` 20 Exchange string `json:"exchange,omitempty"` 21 Expiry int `json:"expiry,omitempty"` 22 FullData string `json:"fullData,omitempty"` 23 LastUpdated string `json:"last_updated,omitempty"` 24 Minimum int `json:"minimum,omitempty"` 25 Nameserver string `json:"nameserver,omitempty"` 26 Port int `json:"port,omitempty"` 27 RefreshInterval int `json:"refreshInterval,omitempty"` 28 RegionOverrides *RegionOverrides `json:"regionOverrides,omitempty"` 29 Retry int `json:"retry,omitempty"` 30 Serial int `json:"serial,omitempty"` 31 Target string `json:"target,omitempty"` 32 Weight int `json:"weight,omitempty"` 33} 34 35// RegionOverrides contains region data. 36type RegionOverrides struct { 37 RData string 38 Region string 39 RegionID int 40} 41 42// DNSRecord is the resource representing a DNS record entry. 43type DNSRecord struct { 44 ID types.FlexInt `json:"id,omitempty"` 45 Name string `json:"name,omitempty"` 46 Prio types.FlexInt `json:"prio,omitempty"` 47 RData string `json:"rdata,omitempty"` 48 TTL types.FlexInt `json:"ttl,omitempty"` 49 Type string `json:"type,omitempty"` 50 Zone string `json:"zone,omitempty"` 51 ZoneID types.FlexInt `json:"zone_id,omitempty"` 52 AdminEmail string `json:"adminEmail,omitempty"` 53 Created string `json:"created,omitempty"` 54 Exchange string `json:"exchange,omitempty"` 55 Expiry types.FlexInt `json:"expiry,omitempty"` 56 FullData string `json:"fullData,omitempty"` 57 LastUpdated string `json:"last_updated,omitempty"` 58 Minimum types.FlexInt `json:"minimum,omitempty"` 59 Nameserver string `json:"nameserver,omitempty"` 60 Port types.FlexInt `json:"port,omitempty"` 61 RefreshInterval types.FlexInt `json:"refreshInterval,omitempty"` 62 RegionOverrides *RegionOverrides `json:"regionOverrides,omitempty"` 63 Retry types.FlexInt `json:"retry,omitempty"` 64 Serial types.FlexInt `json:"serial,omitempty"` 65 Target string `json:"target,omitempty"` 66 Weight types.FlexInt `json:"weight,omitempty"` 67} 68 69// DNSRecordList is an envelope for the API result containing either a list of DNS Records or an error. 70type DNSRecordList struct { 71 liquidweb.ListMeta 72 Items []DNSRecord `json:"items,omitempty"` 73} 74 75// DNSRecordDeletion represents the API result when deleting a DNS Record. 76type DNSRecordDeletion struct { 77 Deleted types.FlexInt `json:"deleted"` 78} 79