Implement libdns ZoneLister interface for provider

This commit is contained in:
Alexandre Oliveira 2023-03-31 16:15:31 +02:00
parent 44dad6df97
commit e079f301dd
3 changed files with 52 additions and 0 deletions

View file

@ -25,6 +25,15 @@ func main() {
provider := vultr.Provider{APIToken: token}
zones, err := provider.ListZones(context.TODO())
if err != nil {
fmt.Printf("ERROR: %s\n", err.Error())
}
for _, zone := range zones {
fmt.Printf("%s\n", zone.Name)
}
records, err := provider.GetRecords(context.TODO(), zone)
if err != nil {
fmt.Printf("ERROR: %s\n", err.Error())