Documentation ¶
Overview ¶
Package hexonet implements a registrar that uses the hexonet api to set name servers. It will self register it's providers when imported.
Index ¶
- func AuditRecords(records []*models.RecordConfig) []error
- type HXClient
- func (n *HXClient) EnsureZoneExists(domain string) error
- func (n *HXClient) GetHXApiError(format string, objectid string, r *response.Response) error
- func (n *HXClient) GetNameservers(domain string) ([]*models.Nameserver, error)
- func (n *HXClient) GetRegistrarCorrections(dc *models.DomainConfig) ([]*models.Correction, error)
- func (n *HXClient) GetZoneRecords(domain string, meta map[string]string) (models.Records, error)
- func (n *HXClient) GetZoneRecordsCorrections(dc *models.DomainConfig, actual models.Records) ([]*models.Correction, int, error)
- func (n *HXClient) ListZones() ([]string, error)
- type HXRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuditRecords ¶
func AuditRecords(records []*models.RecordConfig) []error
AuditRecords returns a list of errors corresponding to the records that aren't supported by this provider. If all records are supported, an empty list is returned.
Types ¶
type HXClient ¶
type HXClient struct { APILogin string APIPassword string APIEntity string // contains filtered or unexported fields }
HXClient describes a connection to the hexonet API.
func (*HXClient) EnsureZoneExists ¶
EnsureZoneExists returns an error * if access to dnszone is not allowed (not authorized) or * if it doesn't exist and creating it fails
func (*HXClient) GetHXApiError ¶
GetHXApiError returns an error including API error code and error description.
func (*HXClient) GetNameservers ¶
func (n *HXClient) GetNameservers(domain string) ([]*models.Nameserver, error)
GetNameservers gets the nameservers set on a domain.
func (*HXClient) GetRegistrarCorrections ¶
func (n *HXClient) GetRegistrarCorrections(dc *models.DomainConfig) ([]*models.Correction, error)
GetRegistrarCorrections gathers corrections that would being n to match dc.
func (*HXClient) GetZoneRecords ¶
GetZoneRecords gets the records of a zone and returns them in RecordConfig format.
func (*HXClient) GetZoneRecordsCorrections ¶
func (n *HXClient) GetZoneRecordsCorrections(dc *models.DomainConfig, actual models.Records) ([]*models.Correction, int, error)
GetZoneRecordsCorrections returns a list of corrections that will turn existing records into dc.Records.
type HXRecord ¶
type HXRecord struct { // Raw api value of that RR Raw string // DomainName is the zone that the record belongs to. DomainName string // Host is the hostname relative to the zone: e.g. for a record for blog.example.org, domain would be "example.org" and host would be "blog". // An apex record would be specified by either an empty host "" or "@". // A SRV record would be specified by "_{service}._{protocol}.{host}": e.g. "_sip._tcp.phone" for _sip._tcp.phone.example.org. Host string // FQDN is the Fully Qualified Domain Name. It is the combination of the host and the domain name. It always ends in a ".". FQDN is ignored in CreateRecord, specify via the Host field instead. Fqdn string // Type is one of the following: A, AAAA, ANAME, CNAME, MX, NS, SRV, or TXT. Type string // Answer is either the IP address for A or AAAA records; the target for ANAME, CNAME, MX, or NS records; the text for TXT records. // For SRV records, answer has the following format: "{weight} {port} {target}" e.g. "1 5061 sip.example.org". Answer string // TTL is the time this record can be cached for in seconds. TTL uint32 // Priority is only required for MX and SRV records, it is ignored for all others. Priority uint32 }
HXRecord covers an individual DNS resource record.