Implement libdns ZoneLister interface for provider
This commit is contained in:
parent
44dad6df97
commit
e079f301dd
3 changed files with 52 additions and 0 deletions
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue