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

DIGITAL OCEAN: Update github.com/digitalocean/godo (#513)

This commit is contained in:
Tom Limoncelli
2019-06-30 08:58:25 -04:00
committed by GitHub
parent 9ff8f6926f
commit d5ff6d6e5c
34 changed files with 2469 additions and 148 deletions

View File

@@ -1,17 +1,16 @@
package godo
import (
"context"
"net/http"
"path"
"strconv"
"github.com/digitalocean/godo/context"
)
const firewallsBasePath = "/v2/firewalls"
// FirewallsService is an interface for managing Firewalls with the DigitalOcean API.
// See: https://developers.digitalocean.com/documentation/documentation/v2/#firewalls
// See: https://developers.digitalocean.com/documentation/v2/#firewalls
type FirewallsService interface {
Get(context.Context, string) (*Firewall, *Response, error)
Create(context.Context, *FirewallRequest) (*Firewall, *Response, error)
@@ -50,6 +49,10 @@ func (fw Firewall) String() string {
return Stringify(fw)
}
func (fw Firewall) URN() string {
return ToURN("Firewall", fw.ID)
}
// FirewallRequest represents the configuration to be applied to an existing or a new Firewall.
type FirewallRequest struct {
Name string `json:"name"`