mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-10-06 03:46:34 +08:00
NAMECHEAP: Enable get-zones (#3775)
This commit is contained in:
parent
589cb77c68
commit
9b32a2f9b2
1 changed files with 14 additions and 0 deletions
|
@ -356,6 +356,20 @@ func (n *namecheapProvider) GetNameservers(domainName string) ([]*models.Nameser
|
|||
return models.ToNameservers(NamecheapDefaultNs)
|
||||
}
|
||||
|
||||
func (n *namecheapProvider) ListZones() ([]string, error) {
|
||||
zones, err := n.client.DomainsGetList()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var zoneList []string
|
||||
for _, zone := range zones {
|
||||
zoneList = append(zoneList, zone.Name)
|
||||
}
|
||||
|
||||
return zoneList, nil
|
||||
}
|
||||
|
||||
// GetRegistrarCorrections returns corrections to update nameservers.
|
||||
func (n *namecheapProvider) GetRegistrarCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
|
||||
var info *nc.DomainInfo
|
||||
|
|
Loading…
Add table
Reference in a new issue