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

@ -5,10 +5,20 @@ import (
"fmt"
"io"
"reflect"
"strings"
)
var timestampType = reflect.TypeOf(Timestamp{})
type ResourceWithURN interface {
URN() string
}
// ToURN converts the resource type and ID to a valid DO API URN.
func ToURN(resourceType string, id interface{}) string {
return fmt.Sprintf("%s:%s:%v", "do", strings.ToLower(resourceType), id)
}
// Stringify attempts to create a string representation of DigitalOcean types
func Stringify(message interface{}) string {
var buf bytes.Buffer