1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Updated govultr to v0.2.0 (#619) (#624)

This commit is contained in:
Patrick Gaskin
2020-02-17 10:47:34 -05:00
committed by GitHub
parent 5a5eeb524c
commit 2e76c0e9d1
6 changed files with 268 additions and 7 deletions

View File

@@ -16,7 +16,7 @@ import (
)
const (
version = "0.1.7"
version = "0.2.0"
defaultBase = "https://api.vultr.com"
userAgent = "govultr/" + version
rateLimit = 600 * time.Millisecond
@@ -24,8 +24,10 @@ const (
)
// whiteListURI is an array of endpoints that should not have the API Key passed to them
var whiteListURI = [12]string{"/v1/regions/availability",
var whiteListURI = [13]string{
"/v1/regions/availability",
"/v1/app/list",
"/v1/objectstorage/list_cluster",
"/v1/os/list",
"/v1/plans/list",
"/v1/plans/list_baremetal",
@@ -71,6 +73,7 @@ type Client struct {
FirewallRule FireWallRuleService
ISO ISOService
Network NetworkService
ObjectStorage ObjectStorageService
OS OSService
Plan PlanService
Region RegionService
@@ -121,6 +124,7 @@ func NewClient(httpClient *http.Client, key string) *Client {
client.FirewallRule = &FireWallRuleServiceHandler{client}
client.ISO = &ISOServiceHandler{client}
client.Network = &NetworkServiceHandler{client}
client.ObjectStorage = &ObjectStorageServiceHandler{client}
client.OS = &OSServiceHandler{client}
client.Plan = &PlanServiceHandler{client}
client.Region = &RegionServiceHandler{client}