mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Rename provider handles to *Provider (#914)
This commit is contained in:
@@ -50,8 +50,8 @@ var features = providers.DocumentationNotes{
|
||||
providers.CanGetZones: providers.Can(),
|
||||
}
|
||||
|
||||
// AxfrDdns stores the client info for the provider.
|
||||
type AxfrDdns struct {
|
||||
// axfrddnsProvider stores the client info for the provider.
|
||||
type axfrddnsProvider struct {
|
||||
rand *rand.Rand
|
||||
master string
|
||||
nameservers []*models.Nameserver
|
||||
@@ -63,7 +63,7 @@ func initAxfrDdns(config map[string]string, providermeta json.RawMessage) (provi
|
||||
// config -- the key/values from creds.json
|
||||
// providermeta -- the json blob from NewReq('name', 'TYPE', providermeta)
|
||||
var err error
|
||||
api := &AxfrDdns{
|
||||
api := &axfrddnsProvider{
|
||||
rand: rand.New(rand.NewSource(int64(time.Now().Nanosecond()))),
|
||||
}
|
||||
param := &Param{}
|
||||
@@ -161,12 +161,12 @@ func readKey(raw string, kind string) (*Key, error) {
|
||||
}
|
||||
|
||||
// GetNameservers returns the nameservers for a domain.
|
||||
func (c *AxfrDdns) GetNameservers(domain string) ([]*models.Nameserver, error) {
|
||||
func (c *axfrddnsProvider) GetNameservers(domain string) ([]*models.Nameserver, error) {
|
||||
return c.nameservers, nil
|
||||
}
|
||||
|
||||
// FetchZoneRecords gets the records of a zone and returns them in dns.RR format.
|
||||
func (c *AxfrDdns) FetchZoneRecords(domain string) ([]dns.RR, error) {
|
||||
func (c *axfrddnsProvider) FetchZoneRecords(domain string) ([]dns.RR, error) {
|
||||
|
||||
transfer := new(dns.Transfer)
|
||||
transfer.DialTimeout = dnsTimeout
|
||||
@@ -203,7 +203,7 @@ func (c *AxfrDdns) FetchZoneRecords(domain string) ([]dns.RR, error) {
|
||||
}
|
||||
|
||||
// GetZoneRecords gets the records of a zone and returns them in RecordConfig format.
|
||||
func (c *AxfrDdns) GetZoneRecords(domain string) (models.Records, error) {
|
||||
func (c *axfrddnsProvider) GetZoneRecords(domain string) (models.Records, error) {
|
||||
|
||||
rawRecords, err := c.FetchZoneRecords(domain)
|
||||
if err != nil {
|
||||
@@ -254,7 +254,7 @@ func (c *AxfrDdns) GetZoneRecords(domain string) (models.Records, error) {
|
||||
}
|
||||
|
||||
// GetDomainCorrections returns a list of corrections to update a domain.
|
||||
func (c *AxfrDdns) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
|
||||
func (c *axfrddnsProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
|
||||
dc.Punycode()
|
||||
|
||||
foundRecords, err := c.GetZoneRecords(dc.Name)
|
||||
|
Reference in New Issue
Block a user