Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions pkg/diff2/groupsort.go

This file was deleted.

5 changes: 0 additions & 5 deletions pkg/providers/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,6 @@ func (n None) GetZoneRecordsCorrections(dc *models.DomainConfig, records models.
return nil, 0, nil
}

// GetDomainCorrections returns corrections to update a domain.
func (n None) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
return nil, nil
}

var featuresNone = DocumentationNotes{
// The default for unlisted capabilities is 'Cannot'.
// See providers/capabilities.go for the entire list of capabilities.
Expand Down
53 changes: 0 additions & 53 deletions pkg/txtutil/txtcombined.go

This file was deleted.

37 changes: 0 additions & 37 deletions providers/cloudns/cloudnsProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,43 +96,6 @@ func (c *cloudnsProvider) GetNameservers(domain string) ([]*models.Nameserver, e
return models.ToNameservers(names)
}

// // GetDomainCorrections returns the corrections for a domain.
// func (c *cloudnsProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
// dc, err := dc.Copy()
// if err != nil {
// return nil, err
// }

// dc.Punycode()

// if c.domainIndex == nil {
// if err := c.fetchDomainList(); err != nil {
// return nil, err
// }
// }
// _, ok := c.domainIndex[dc.Name]
// if !ok {
// return nil, fmt.Errorf("'%s' not a zone in ClouDNS account", dc.Name)
// }

// existingRecords, err := c.GetZoneRecords(dc.Name)
// if err != nil {
// return nil, err
// }
// // Normalize
// models.PostProcessRecords(existingRecords)

// // Get a list of available TTL values.
// // The TTL list needs to be obtained for each domain, so get it first here.
// c.fetchAvailableTTLValues(dc.Name)
// // ClouDNS can only be specified from a specific TTL list, so change the TTL in advance.
// for _, record := range dc.Records {
// record.TTL = fixTTL(record.TTL)
// }

// return c.GetZoneRecordsCorrections(dc, existingRecords)
// }

// GetZoneRecordsCorrections returns a list of corrections that will turn existing records into dc.Records.
func (c *cloudnsProvider) GetZoneRecordsCorrections(dc *models.DomainConfig, existingRecords models.Records) ([]*models.Correction, int, error) {
domainID, ok, err := c.idForDomain(dc.Name)
Expand Down
2 changes: 1 addition & 1 deletion providers/cnr/nameservers.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (n *Client) getNameserversRaw(domain string) ([]string, error) {
return ns, nil
}

// GetRegistrarCorrections gathers corrections that would being n to match dc.
// GetRegistrarCorrections gathers corrections that would bring n to match dc.
func (n *Client) GetRegistrarCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
nss, err := n.getNameserversRaw(dc.Name)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion providers/cscglobal/registrar.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/StackExchange/dnscontrol/v4/models"
)

// GetRegistrarCorrections gathers corrections that would being n to match dc.
// GetRegistrarCorrections gathers corrections that would bring n to match dc.
func (client *providerClient) GetRegistrarCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
nss, err := client.getNameservers(dc.Name)
if err != nil {
Expand Down
23 changes: 0 additions & 23 deletions providers/desec/desecProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,29 +77,6 @@ func (c *desecProvider) GetNameservers(domain string) ([]*models.Nameserver, err
return models.ToNameservers(defaultNameServerNames)
}

// func (c *desecProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
// if dc.AutoDNSSEC == "off" {
// printer.Printf("Notice: DNSSEC signing was not requested, but cannot be turned off. (deSEC always signs all records.)\n")
// }

// existing, err := c.GetZoneRecords(dc.Name)
// if err != nil {
// return nil, err
// }
// models.PostProcessRecords(existing)
// clean := PrepFoundRecords(existing)
// var minTTL uint32
// c.mutex.Lock()
// if ttl, ok := c.domainIndex[dc.Name]; !ok {
// minTTL = 3600
// } else {
// minTTL = ttl
// }
// c.mutex.Unlock()
// PrepDesiredRecords(dc, minTTL)
// return c.GetZoneRecordsCorrections(dc, clean)
// }

// GetZoneRecords gets the records of a zone and returns them in RecordConfig format.
func (c *desecProvider) GetZoneRecords(domain string, meta map[string]string) (models.Records, error) {
punycodeDomain, err := idna.ToASCII(domain)
Expand Down
1 change: 0 additions & 1 deletion providers/dnsimple/dnsimpleProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ func (c *dnsimpleProvider) GetRegistrarCorrections(dc *models.DomainConfig) ([]*
return nil, err
}
sort.Strings(nameServers)

actual := strings.Join(nameServers, ",")

var expectedSet []string
Expand Down
36 changes: 0 additions & 36 deletions providers/dnsmadeeasy/dnsMadeEasyProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,42 +68,6 @@ func New(settings map[string]string, _ json.RawMessage) (providers.DNSServicePro
return api, nil
}

// // GetDomainCorrections returns the corrections for a domain.
// func (api *dnsMadeEasyProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
// dc, err := dc.Copy()
// if err != nil {
// return nil, err
// }

// err = dc.Punycode()
// if err != nil {
// return nil, err
// }

// for _, rec := range dc.Records {
// if rec.Type == "ALIAS" {
// // ALIAS is called ANAME on DNS Made Easy
// rec.Type = "ANAME"
// } else if rec.Type == "NS" {
// // NS records have fixed TTL on DNS Made Easy and it cannot be changed
// rec.TTL = fixedNameServerRecordTTL
// }
// }

// domainName := dc.Name

// // Get existing records
// existingRecords, err := api.GetZoneRecords(domainName)
// if err != nil {
// return nil, err
// }

// // Normalize
// models.PostProcessRecords(existingRecords)

// return api.GetZoneRecordsCorrections(dc, existingRecords)
// }

func (api *dnsMadeEasyProvider) GetZoneRecordsCorrections(dc *models.DomainConfig, existingRecords models.Records) ([]*models.Correction, int, error) {
domainName := dc.Name
domainID, err := api.findDomainID(domainName)
Expand Down
3 changes: 1 addition & 2 deletions providers/doh/dohProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func newDNSOverHTTPS(m map[string]string) (providers.Registrar, error) {
return api, nil
}

// GetRegistrarCorrections gathers corrections that would being n to match dc.
// GetRegistrarCorrections gathers corrections that would bring n to match dc.
func (c *dohProvider) GetRegistrarCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
nss, err := c.getNameservers(dc.Name)
if err != nil {
Expand All @@ -58,7 +58,6 @@ func (c *dohProvider) GetRegistrarCorrections(dc *models.DomainConfig) ([]*model
if foundNameservers == expectedNameservers {
return nil, nil
}

return []*models.Correction{
{
Msg: fmt.Sprintf("Update nameservers %s -> %s", foundNameservers, expectedNameservers),
Expand Down
2 changes: 1 addition & 1 deletion providers/easyname/easynameProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func newEasyname(m map[string]string) (providers.Registrar, error) {
return api, nil
}

// GetRegistrarCorrections gathers corrections that would being n to match dc.
// GetRegistrarCorrections gathers corrections that would bring n to match dc.
func (c *easynameProvider) GetRegistrarCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
domain, err := c.getDomain(dc.Name)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions providers/gidinet/registrar.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func (c *gidinetProvider) GetRegistrarCorrections(dc *models.DomainConfig) ([]*m
desired[i] = strings.ToLower(strings.TrimSuffix(ns, "."))
}
// Deduplicate nameservers (can happen when NAMESERVER() and DNS provider both add them)
// FUTURE(tlim): Remove deduplication logic. The "existing" and "desired" lists are not merged, and "desired" is authoritative.
seen := make(map[string]bool)
var uniqueDesired []string
for _, ns := range desired {
Expand Down
2 changes: 1 addition & 1 deletion providers/hexonet/nameservers.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (n *HXClient) getNameserversRaw(domain string) ([]string, error) {
return ns, nil
}

// GetRegistrarCorrections gathers corrections that would being n to match dc.
// GetRegistrarCorrections gathers corrections that would bring n to match dc.
func (n *HXClient) GetRegistrarCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
nss, err := n.getNameserversRaw(dc.Name)
if err != nil {
Expand Down
5 changes: 0 additions & 5 deletions providers/hostingde/hostingdeProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,6 @@ func firstNonZero(items ...uint32) uint32 {
}

func (hp *hostingdeProvider) GetRegistrarCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
// err := dc.Punycode()
// if err != nil {
// return nil, err
// }

found, err := hp.getNameservers(dc.Name)
if err != nil {
return nil, fmt.Errorf("error getting nameservers: %w", err)
Expand Down
2 changes: 1 addition & 1 deletion providers/internetbs/internetbsProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func newInternetBs(m map[string]string) (providers.Registrar, error) {
return api, nil
}

// GetRegistrarCorrections gathers corrections that would being n to match dc.
// GetRegistrarCorrections gathers corrections that would bring n to match dc.
func (c *internetbsProvider) GetRegistrarCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
nss, err := c.getNameservers(dc.Name)
if err != nil {
Expand Down
Loading
Loading