mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-02-22 22:52:56 +08:00
ROUTE53: Fully implement get-zones (#638)
* ROUTE53: Implement ListZones * DNSIMPLE: Fix comment
This commit is contained in:
parent
b45c6b6b6c
commit
386275fde1
2 changed files with 11 additions and 1 deletions
|
@ -377,7 +377,7 @@ func (c *DnsimpleApi) updateRecordFunc(old *dnsimpleapi.ZoneRecord, rc *models.R
|
|||
}
|
||||
}
|
||||
|
||||
// Returns all the zones in an account
|
||||
// ListZones returns all the zones in an account
|
||||
func (c *DnsimpleApi) ListZones() ([]string, error) {
|
||||
client := c.getClient()
|
||||
accountID, err := c.getAccountID()
|
||||
|
|
|
@ -110,6 +110,16 @@ func withRetry(f func() error) {
|
|||
}
|
||||
}
|
||||
|
||||
// ListZones lists the zones on this account.
|
||||
func (r *route53Provider) ListZones() ([]string, error) {
|
||||
var zones []string
|
||||
// Assumes r.zones was filled already by newRoute53().
|
||||
for i := range r.zones {
|
||||
zones = append(zones, i)
|
||||
}
|
||||
return zones, nil
|
||||
}
|
||||
|
||||
func (r *route53Provider) getZones() error {
|
||||
var nextMarker *string
|
||||
r.zones = make(map[string]*r53.HostedZone)
|
||||
|
|
Loading…
Reference in a new issue