mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-11-10 17:26:10 +08:00
INWX: Implemented ListZones() support (#2428)
Co-authored-by: Tom Limoncelli <tal@whatexit.org>
This commit is contained in:
parent
3250681821
commit
68084726c0
1 changed files with 16 additions and 0 deletions
|
@ -343,6 +343,22 @@ func (api *inwxAPI) GetZoneRecords(domain string, meta map[string]string) (model
|
|||
return records, nil
|
||||
}
|
||||
|
||||
// ListZones returns the zones configured in INWX.
|
||||
func (api *inwxAPI) ListZones() ([]string, error) {
|
||||
if api.domainIndex == nil { // only pull the data once.
|
||||
if err := api.fetchNameserverDomains(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
var domains []string
|
||||
for domain := range api.domainIndex {
|
||||
domains = append(domains, domain)
|
||||
}
|
||||
|
||||
return domains, nil
|
||||
}
|
||||
|
||||
// updateNameservers is used by GetRegistrarCorrections to update the domain's nameservers.
|
||||
func (api *inwxAPI) updateNameservers(ns []string, domain string) func() error {
|
||||
return func() error {
|
||||
|
|
Loading…
Reference in a new issue