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:
@ -343,6 +343,22 @@ func (api *inwxAPI) GetZoneRecords(domain string, meta map[string]string) (model
|
|||||||
return records, nil
|
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.
|
// updateNameservers is used by GetRegistrarCorrections to update the domain's nameservers.
|
||||||
func (api *inwxAPI) updateNameservers(ns []string, domain string) func() error {
|
func (api *inwxAPI) updateNameservers(ns []string, domain string) func() error {
|
||||||
return func() error {
|
return func() error {
|
||||||
|
Reference in New Issue
Block a user