1
0
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:
Tom Limoncelli
2020-10-26 09:25:30 -04:00
committed by GitHub
parent 29c7ff3a05
commit ca30c9c34f
43 changed files with 318 additions and 318 deletions

View File

@@ -46,7 +46,7 @@ var features = providers.DocumentationNotes{
func initProvider(config map[string]string, providermeta json.RawMessage) (providers.DNSServiceProvider, error) {
// config -- the key/values from creds.json
// meta -- the json blob from NewReq('name', 'TYPE', meta)
api := &Provider{
api := &octodnsProvider{
directory: config["directory"],
}
if api.directory == "" {
@@ -66,8 +66,8 @@ func init() {
providers.RegisterDomainServiceProviderType("OCTODNS", initProvider, features)
}
// Provider is the provider handle for the OctoDNS driver.
type Provider struct {
// octodnsProvider is the provider handle for the OctoDNS driver.
type octodnsProvider struct {
//DefaultNS []string `json:"default_ns"`
//DefaultSoa SoaInfo `json:"default_soa"`
//nameservers []*models.Nameserver
@@ -75,12 +75,12 @@ type Provider struct {
}
// GetNameservers returns the nameservers for a domain.
func (c *Provider) GetNameservers(string) ([]*models.Nameserver, error) {
func (c *octodnsProvider) GetNameservers(string) ([]*models.Nameserver, error) {
return nil, nil
}
// GetZoneRecords gets the records of a zone and returns them in RecordConfig format.
func (c *Provider) GetZoneRecords(domain string) (models.Records, error) {
func (c *octodnsProvider) GetZoneRecords(domain string) (models.Records, error) {
return nil, fmt.Errorf("not implemented")
// This enables the get-zones subcommand.
// Implement this by extracting the code from GetDomainCorrections into
@@ -88,7 +88,7 @@ func (c *Provider) GetZoneRecords(domain string) (models.Records, error) {
}
// GetDomainCorrections returns a list of corrections to update a domain.
func (c *Provider) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
func (c *octodnsProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
dc.Punycode()
// Phase 1: Copy everything to []*models.RecordConfig:
// expectedRecords < dc.Records[i]