Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultEndpoint = "https://api.autodns.com/v1/"
DefaultEndpoint default API endpoint.
View Source
const DefaultEndpointContext int = 4
DefaultEndpointContext default API endpoint context.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { BaseURL *url.URL HTTPClient *http.Client // contains filtered or unexported fields }
Client the Autodns API client.
func (*Client) AddTxtRecords ¶
func (c *Client) AddTxtRecords(ctx context.Context, domain string, records []*ResourceRecord) (*Zone, error)
AddTxtRecords adds TXT records.
func (*Client) RemoveTXTRecords ¶
func (c *Client) RemoveTXTRecords(ctx context.Context, domain string, records []*ResourceRecord) error
RemoveTXTRecords removes TXT records.
type DataZoneResponse ¶
type DataZoneResponse struct { STID string `json:"stid"` CTID string `json:"ctid"` Messages []*ResponseMessage `json:"messages"` Status *ResponseStatus `json:"status"` Object any `json:"object"` Data []*Zone `json:"data"` }
type ResourceRecord ¶
type ResourceRecord struct { Name string `json:"name"` TTL int64 `json:"ttl"` Type string `json:"type"` Value string `json:"value"` Pref int32 `json:"pref,omitempty"` }
ResourceRecord holds a resource record. https://help.internetx.com/display/APIXMLEN/Resource+Record+Object
type ResponseMessage ¶
type ResponseObject ¶
type ResponseStatus ¶
type Zone ¶
type Zone struct { Name string `json:"origin"` ResourceRecords []*ResourceRecord `json:"resourceRecords"` Action string `json:"action"` VirtualNameServer string `json:"virtualNameServer"` }
Zone is an autodns zone record with all for us relevant fields. https://help.internetx.com/display/APIXMLEN/Zone+Object
type ZoneStream ¶
type ZoneStream struct { Adds []*ResourceRecord `json:"adds"` Removes []*ResourceRecord `json:"rems"` }
ZoneStream body of the requests. https://github.com/InterNetX/domainrobot-api/blob/bdc8fe92a2f32fcbdb29e30bf6006ab446f81223/src/domainrobot.json#L35914-L35932
Click to show internal directories.
Click to hide internal directories.