mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-09-13 16:44:57 +08:00
TRANSIP: Implementation get-zones all (#1980)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
parent
8f09e3b03f
commit
b9b35d516e
1 changed files with 14 additions and 0 deletions
|
@ -3,6 +3,7 @@ package transip
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/StackExchange/dnscontrol/v3/models"
|
||||
|
@ -79,6 +80,19 @@ func init() {
|
|||
providers.RegisterDomainServiceProviderType("TRANSIP", fns, features)
|
||||
}
|
||||
|
||||
func (n *transipProvider) ListZones() ([]string, error) {
|
||||
var domains []string
|
||||
|
||||
domainsMap, _ := n.domains.GetAll()
|
||||
for _, domainname := range domainsMap {
|
||||
domains = append(domains, domainname.Name)
|
||||
}
|
||||
|
||||
sort.Strings(domains)
|
||||
|
||||
return domains, nil
|
||||
}
|
||||
|
||||
func (n *transipProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
|
||||
|
||||
curRecords, err := n.GetZoneRecords(dc.Name)
|
||||
|
|
Loading…
Add table
Reference in a new issue