1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

INWX: Implemented ListZones() support (#2428)

Co-authored-by: Tom Limoncelli <tal@whatexit.org>
This commit is contained in:
Patrik Kernstock
2023-06-08 18:59:57 +01:00
committed by GitHub
parent 3250681821
commit 68084726c0

View File

@ -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 {