It's DigitalOcean

This commit is contained in:
bryanl 2015-09-18 09:10:59 -04:00
parent 0d77b009a8
commit 32ac48f00c
12 changed files with 16 additions and 16 deletions

View File

@ -6,7 +6,7 @@ Godo is a Go client library for accessing the DigitalOcean V2 API.
You can view the client API docs here: [http://godoc.org/github.com/digitalocean/godo](http://godoc.org/github.com/digitalocean/godo)
You can view Digital Ocean API docs here: [https://developers.digitalocean.com/documentation/v2/](https://developers.digitalocean.com/documentation/v2/)
You can view DigitalOcean API docs here: [https://developers.digitalocean.com/documentation/v2/](https://developers.digitalocean.com/documentation/v2/)
## Usage
@ -22,7 +22,7 @@ access different parts of the DigitalOcean API.
Currently, Personal Access Token (PAT) is the only method of
authenticating with the API. You can manage your tokens
at the Digital Ocean Control Panel [Applications Page](https://cloud.digitalocean.com/settings/applications).
at the DigitalOcean Control Panel [Applications Page](https://cloud.digitalocean.com/settings/applications).
You can then use your token to create a new client:

View File

@ -1,7 +1,7 @@
package godo
// AccountService is an interface for interfacing with the Account
// endpoints of the Digital Ocean API
// endpoints of the DigitalOcean API
// See: https://developers.digitalocean.com/documentation/v2/#account
type AccountService interface {
Get() (*Account, *Response, error)

View File

@ -4,7 +4,7 @@ import "fmt"
const domainsBasePath = "v2/domains"
// DomainsService is an interface for managing DNS with the Digital Ocean API.
// DomainsService is an interface for managing DNS with the DigitalOcean API.
// See: https://developers.digitalocean.com/documentation/v2#domains and
// https://developers.digitalocean.com/documentation/v2#domain-records
type DomainsService interface {
@ -28,14 +28,14 @@ type DomainsServiceOp struct {
var _ DomainsService = &DomainsServiceOp{}
// Domain represents a Digital Ocean domain
// Domain represents a DigitalOcean domain
type Domain struct {
Name string `json:"name"`
TTL int `json:"ttl"`
ZoneFile string `json:"zone_file"`
}
// domainRoot represents a response from the Digital Ocean API
// domainRoot represents a response from the DigitalOcean API
type domainRoot struct {
Domain *Domain `json:"domain"`
}

View File

@ -9,7 +9,7 @@ import (
type ActionRequest map[string]interface{}
// DropletActionsService is an interface for interfacing with the droplet actions
// endpoints of the Digital Ocean API
// endpoints of the DigitalOcean API
// See: https://developers.digitalocean.com/documentation/v2#droplet-actions
type DropletActionsService interface {
Shutdown(int) (*Action, *Response, error)

View File

@ -8,7 +8,7 @@ import (
const dropletBasePath = "v2/droplets"
// DropletsService is an interface for interfacing with the droplet
// endpoints of the Digital Ocean API
// endpoints of the DigitalOcean API
// See: https://developers.digitalocean.com/documentation/v2#droplets
type DropletsService interface {
List(*ListOptions) ([]Droplet, *Response, error)

View File

@ -71,7 +71,7 @@ type ListOptions struct {
PerPage int `url:"per_page,omitempty"`
}
// Response is a Digital Ocean response. This wraps the standard http.Response returned from DigitalOcean.
// Response is a DigitalOcean response. This wraps the standard http.Response returned from DigitalOcean.
type Response struct {
*http.Response
@ -133,7 +133,7 @@ func addOptions(s string, opt interface{}) (string, error) {
return origURL.String(), nil
}
// NewClient returns a new Digital Ocean API client.
// NewClient returns a new DigitalOcean API client.
func NewClient(httpClient *http.Client) *Client {
if httpClient == nil {
httpClient = http.DefaultClient

View File

@ -3,7 +3,7 @@ package godo
import "fmt"
// ImageActionsService is an interface for interfacing with the image actions
// endpoints of the Digital Ocean API
// endpoints of the DigitalOcean API
// See: https://developers.digitalocean.com/documentation/v2#image-actions
type ImageActionsService interface {
Get(int, int) (*Action, *Response, error)

View File

@ -5,7 +5,7 @@ import "fmt"
const imageBasePath = "v2/images"
// ImagesService is an interface for interfacing with the images
// endpoints of the Digital Ocean API
// endpoints of the DigitalOcean API
// See: https://developers.digitalocean.com/documentation/v2#images
type ImagesService interface {
List(*ListOptions) ([]Image, *Response, error)

View File

@ -5,7 +5,7 @@ import "fmt"
const keysBasePath = "v2/account/keys"
// KeysService is an interface for interfacing with the keys
// endpoints of the Digital Ocean API
// endpoints of the DigitalOcean API
// See: https://developers.digitalocean.com/documentation/v2#keys
type KeysService interface {
List(*ListOptions) ([]Key, *Response, error)

View File

@ -1,7 +1,7 @@
package godo
// RegionsService is an interface for interfacing with the regions
// endpoints of the Digital Ocean API
// endpoints of the DigitalOcean API
// See: https://developers.digitalocean.com/documentation/v2#regions
type RegionsService interface {
List(*ListOptions) ([]Region, *Response, error)

View File

@ -1,7 +1,7 @@
package godo
// SizesService is an interface for interfacing with the size
// endpoints of the Digital Ocean API
// endpoints of the DigitalOcean API
// See: https://developers.digitalocean.com/documentation/v2#sizes
type SizesService interface {
List(*ListOptions) ([]Size, *Response, error)

View File

@ -8,7 +8,7 @@ import (
var timestampType = reflect.TypeOf(Timestamp{})
// Stringify attempts to create a string representation of Digital Ocean types
// Stringify attempts to create a string representation of DigitalOcean types
func Stringify(message interface{}) string {
var buf bytes.Buffer
v := reflect.ValueOf(message)