Documentation ¶
Index ¶
- Constants
- func AuditRecords(records []*models.RecordConfig) []error
- func PrepDesiredRecords(dc *models.DomainConfig)
- type APIClient
- func (c *APIClient) CreateRecord(domain string, subdomain string, record paramStruct) error
- func (c *APIClient) CreateRecordSimulate(domain string, subdomain string, record paramStruct) error
- func (c *APIClient) DeleteRecord(domain string, subdomain string, recordID uint32) error
- func (c *APIClient) DeleteRecordSimulate(domain string, subdomain string, recordID uint32) error
- func (c *APIClient) DeleteSubdomain(domain, subdomain string) error
- func (c *APIClient) GetDomainNS(domain string) ([]string, error)
- func (c *APIClient) GetNameservers(domain string) ([]*models.Nameserver, error)
- func (c *APIClient) GetRegistrarCorrections(dc *models.DomainConfig) ([]*models.Correction, error)
- func (c *APIClient) GetSubDomains(domain string) ([]string, error)
- func (c *APIClient) GetZoneRecords(domain string, meta map[string]string) (models.Records, error)
- func (c *APIClient) GetZoneRecordsCorrections(dc *models.DomainConfig, existingRecords models.Records) ([]*models.Correction, error)
- func (c *APIClient) ListZones() ([]string, error)
- func (c *APIClient) UpdateRecord(domain string, subdomain string, rec paramStruct) error
- func (c *APIClient) UpdateRecordSimulate(domain string, subdomain string, rec paramStruct) error
- type Property
- type Value
Constants ¶
const ( DefaultBaseNOURL = "https://api.loopia.no/RPCSERV" DefaultBaseRSURL = "https://api.loopia.rs/RPCSERV" DefaultBaseSEURL = "https://api.loopia.se/RPCSERV" )
DefaultBaseNOURL and others are RPC end-points.
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.
func PrepDesiredRecords ¶
func PrepDesiredRecords(dc *models.DomainConfig)
PrepDesiredRecords munges any records to best suit this provider.
Types ¶
type APIClient ¶
type APIClient struct { APIUser string APIPassword string BaseURL string HTTPClient *http.Client ModifyNameServers bool FetchNSEntries bool Debug bool // contains filtered or unexported fields }
APIClient is the APIClient handle used to store any client-related state.
func NewClient ¶
func NewClient(apiUser, apiPassword string, region string, modifyns bool, fetchns bool, debug bool) *APIClient
NewClient creates a new LoopiaClient.
func (*APIClient) CreateRecord ¶
CreateRecord adds a record.
func (*APIClient) CreateRecordSimulate ¶
CreateRecordSimulate only prints info about a record addition. Used for debugging.
func (*APIClient) DeleteRecord ¶
DeleteRecord deletes a record.
func (*APIClient) DeleteRecordSimulate ¶
DeleteRecordSimulate only prints info about a record deletion. Used for debugging.
func (*APIClient) DeleteSubdomain ¶
DeleteSubdomain deletes a sub-domain and its child records.
func (*APIClient) GetDomainNS ¶
GetDomainNS gets all NS records for a subdomain, in this case, the apex "@"
func (*APIClient) GetNameservers ¶
func (c *APIClient) GetNameservers(domain string) ([]*models.Nameserver, error)
GetNameservers returns a list of nameservers for domain.
func (*APIClient) GetRegistrarCorrections ¶
func (c *APIClient) GetRegistrarCorrections(dc *models.DomainConfig) ([]*models.Correction, error)
GetRegistrarCorrections returns a list of corrections for this registrar.
func (*APIClient) GetSubDomains ¶
GetSubDomains gets all the subdomains within a domain, no records
func (*APIClient) GetZoneRecords ¶
GetZoneRecords gathers the DNS records and converts them to dnscontrol's format.
func (*APIClient) GetZoneRecordsCorrections ¶
func (c *APIClient) GetZoneRecordsCorrections(dc *models.DomainConfig, existingRecords models.Records) ([]*models.Correction, error)
GetZoneRecordsCorrections returns a list of corrections that will turn existing records into dc.Records.
func (*APIClient) UpdateRecord ¶
UpdateRecord updates a record.