update client to reflect available services
This commit is contained in:
parent
ca83da38ea
commit
bc5582277e
6
godo.go
6
godo.go
|
@ -48,12 +48,15 @@ type Client struct {
|
||||||
|
|
||||||
// Services used for communicating with the API
|
// Services used for communicating with the API
|
||||||
Actions ActionsService
|
Actions ActionsService
|
||||||
|
Domains DomainsService
|
||||||
Droplets DropletsService
|
Droplets DropletsService
|
||||||
DropletActions DropletActionsService
|
DropletActions DropletActionsService
|
||||||
Images ImagesService
|
Images ImagesService
|
||||||
ImageActions ImageActionsService
|
ImageActions ImageActionsService
|
||||||
Keys KeysService
|
Keys KeysService
|
||||||
Regions RegionsService
|
Regions RegionsService
|
||||||
|
Sizes SizesService
|
||||||
|
Tags TagsService
|
||||||
|
|
||||||
// Optional function called after every successful request made to the DO APIs
|
// Optional function called after every successful request made to the DO APIs
|
||||||
onRequestCompleted RequestCompletionCallback
|
onRequestCompleted RequestCompletionCallback
|
||||||
|
@ -183,12 +186,15 @@ func NewClient(httpClient *http.Client) *Client {
|
||||||
|
|
||||||
c := &Client{client: httpClient, BaseURL: baseURL, UserAgent: userAgent}
|
c := &Client{client: httpClient, BaseURL: baseURL, UserAgent: userAgent}
|
||||||
c.Actions = &ActionsServiceOp{client: c}
|
c.Actions = &ActionsServiceOp{client: c}
|
||||||
|
c.Domains = &DomainsServiceOp{client: c}
|
||||||
c.Droplets = &DropletsServiceOp{client: c}
|
c.Droplets = &DropletsServiceOp{client: c}
|
||||||
c.DropletActions = &DropletActionsServiceOp{client: c}
|
c.DropletActions = &DropletActionsServiceOp{client: c}
|
||||||
c.Images = &ImagesServiceOp{client: c}
|
c.Images = &ImagesServiceOp{client: c}
|
||||||
c.ImageActions = &ImageActionsServiceOp{client: c}
|
c.ImageActions = &ImageActionsServiceOp{client: c}
|
||||||
c.Keys = &KeysServiceOp{client: c}
|
c.Keys = &KeysServiceOp{client: c}
|
||||||
c.Regions = &RegionsServiceOp{client: c}
|
c.Regions = &RegionsServiceOp{client: c}
|
||||||
|
c.Sizes = &SizesServiceOp{client: c}
|
||||||
|
c.Tags = &TagsServiceOp{client: c}
|
||||||
|
|
||||||
c.headers = make(map[string]string)
|
c.headers = make(map[string]string)
|
||||||
|
|
||||||
|
|
10
godo_test.go
10
godo_test.go
|
@ -73,25 +73,15 @@ func testURLParseError(t *testing.T, err error) {
|
||||||
|
|
||||||
func testClientServices(t *testing.T, c *Client) {
|
func testClientServices(t *testing.T, c *Client) {
|
||||||
services := []string{
|
services := []string{
|
||||||
"Account",
|
|
||||||
"Actions",
|
"Actions",
|
||||||
"Balance",
|
|
||||||
"BillingHistory",
|
|
||||||
"CDNs",
|
|
||||||
"Domains",
|
"Domains",
|
||||||
"Droplets",
|
"Droplets",
|
||||||
"DropletActions",
|
"DropletActions",
|
||||||
"Images",
|
"Images",
|
||||||
"ImageActions",
|
"ImageActions",
|
||||||
"Invoices",
|
|
||||||
"Keys",
|
"Keys",
|
||||||
"Monitoring",
|
|
||||||
"Regions",
|
"Regions",
|
||||||
"Sizes",
|
"Sizes",
|
||||||
"FloatingIPs",
|
|
||||||
"FloatingIPActions",
|
|
||||||
"ReservedIPs",
|
|
||||||
"ReservedIPActions",
|
|
||||||
"Tags",
|
"Tags",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue