Documentation
¶
Index ¶
- type AutoDNSError
- type AutoDNSMessage
- type AutoDNSObject
- type AutoDNSResponse
- type AutoDNSUser
- type Provider
- func (p *Provider) AppendRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
- func (p *Provider) DeleteRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
- func (p *Provider) GetRecords(ctx context.Context, zone string) ([]libdns.Record, error)
- func (p *Provider) SetRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
- type RequestZone
- type ResponseSearch
- type ResponseSearchItem
- type ResponseZone
- type ZoneItem
- type ZoneRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoDNSError ¶
type AutoDNSError struct {
// contains filtered or unexported fields
}
func NewError ¶
func NewError(resp AutoDNSResponse) *AutoDNSError
func (*AutoDNSError) Error ¶
func (m *AutoDNSError) Error() string
func (*AutoDNSError) Messages ¶
func (m *AutoDNSError) Messages() []*AutoDNSMessage
type AutoDNSMessage ¶
type AutoDNSMessage struct { Text string `json:"text"` Objects []AutoDNSObject `json:"objects"` Code string `json:"code"` Status string `json:"status"` }
type AutoDNSObject ¶
type AutoDNSResponse ¶
type AutoDNSResponse struct { STID string `json:"stid"` Status struct { Type string `json:"type"` Code *string `json:"resultCode,omitempty"` Text *string `json:"text,omitempty"` } `json:"status"` Object *AutoDNSObject `json:"object,omitempty"` // potential error messages Messages []*AutoDNSMessage `json:"messages,omitempty"` }
type AutoDNSUser ¶
type Provider ¶
type Provider struct { Username string `json:"username"` Password string `json:"password"` Endpoint string `json:"Endpoint"` Context string `json:"context"` Primary string `json:"primary"` HttpClient *http.Client `json:"-"` }
Provider facilitates DNS record manipulation with Autodns.
func NewWithDefaults ¶
NewWithDefaults is a convenience method to create the provider with sensible defaults.
func (*Provider) AppendRecords ¶
func (p *Provider) AppendRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
AppendRecords adds records to the zone. It returns the records that were added.
func (*Provider) DeleteRecords ¶
func (p *Provider) DeleteRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
DeleteRecords deletes the records from the zone. It returns the records that were deleted.
func (*Provider) GetRecords ¶
GetRecords lists all the records in the zone.
type RequestZone ¶
type RequestZone struct {
Domain string `json:"domain"`
}
type ResponseSearch ¶
type ResponseSearch struct { AutoDNSResponse Data []ResponseSearchItem `json:"data"` }
type ResponseSearchItem ¶
type ResponseSearchItem struct { Created string `json:"created"` Updated string `json:"updated"` Origin string `json:"origin"` NSGroup string `json:"nameServerGroup"` Owner AutoDNSUser `json:"owner"` Updater AutoDNSUser `json:"updater"` DomainSafe bool `json:"domainsafe"` WWWWInclude bool `json:"wwwInclude"` Nameserver string `json:"virtualNameserver"` }
type ResponseZone ¶
type ResponseZone struct { AutoDNSResponse Data []ZoneItem `json:"data"` }
type ZoneItem ¶
type ZoneItem struct { Created string `json:"created"` Updated string `json:"updated"` Origin string `json:"origin"` SOA struct { Refresh int `json:"refresh"` Retry int `json:"retry"` Expire int `json:"expire"` TTL int `json:"ttl"` Email string `json:"email"` } `json:"soa"` NSGroup string `json:"nameServerGroup"` Owner AutoDNSUser `json:"owner"` Updater AutoDNSUser `json:"updater"` DomainSafe bool `json:"domainsafe"` PurgeType string `json:"purgeType"` Nameservers []struct { Name string `json:"name"` } `json:"nameservers"` Main struct { Address string `json:"address"` } `json:"main"` WWWWInclude bool `json:"wwwInclude"` Nameserver string `json:"virtualNameserver"` Action string `json:"action"` Records []ZoneRecord `json:"resourceRecords"` ROID int `json:"roid"` }
type ZoneRecord ¶
Click to show internal directories.
Click to hide internal directories.