mirror of https://github.com/docker/docs.git
Update godo to 0.5.0
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
This commit is contained in:
parent
b1a5e12b51
commit
3c00d74c44
|
@ -19,8 +19,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/digitalocean/godo",
|
"ImportPath": "github.com/digitalocean/godo",
|
||||||
"Comment": "v0.4.0-1-ga7066ec",
|
"Comment": "v0.5.0",
|
||||||
"Rev": "a7066ece1ff635d9fc12d123cd8a22aaf7b0062e"
|
"Rev": "5478aae80694de1d2d0e02c386bbedd201266234"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/docker/docker/api",
|
"ImportPath": "github.com/docker/docker/api",
|
||||||
|
|
|
@ -57,11 +57,15 @@ type dropletsRoot struct {
|
||||||
|
|
||||||
// DropletCreateRequest represents a request to create a droplet.
|
// DropletCreateRequest represents a request to create a droplet.
|
||||||
type DropletCreateRequest struct {
|
type DropletCreateRequest struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Region string `json:"region"`
|
Region string `json:"region"`
|
||||||
Size string `json:"size"`
|
Size string `json:"size"`
|
||||||
Image string `json:"image"`
|
Image string `json:"image"`
|
||||||
SSHKeys []interface{} `json:"ssh_keys"`
|
SSHKeys []interface{} `json:"ssh_keys"`
|
||||||
|
Backups bool `json:"backups"`
|
||||||
|
IPv6 bool `json:"ipv6"`
|
||||||
|
PrivateNetworking bool `json:"private_networking"`
|
||||||
|
UserData string `json:"user_data"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d DropletCreateRequest) String() string {
|
func (d DropletCreateRequest) String() string {
|
||||||
|
|
|
@ -78,7 +78,10 @@ func TestNewRequest(t *testing.T) {
|
||||||
c := NewClient(nil)
|
c := NewClient(nil)
|
||||||
|
|
||||||
inURL, outURL := "/foo", defaultBaseURL+"foo"
|
inURL, outURL := "/foo", defaultBaseURL+"foo"
|
||||||
inBody, outBody := &DropletCreateRequest{Name: "l"}, `{"name":"l","region":"","size":"","image":"","ssh_keys":null}`+"\n"
|
inBody, outBody := &DropletCreateRequest{Name: "l"},
|
||||||
|
`{"name":"l","region":"","size":"","image":"",`+
|
||||||
|
`"ssh_keys":null,"backups":false,"ipv6":false,`+
|
||||||
|
`"private_networking":false,"user_data":""}`+"\n"
|
||||||
req, _ := c.NewRequest("GET", inURL, inBody)
|
req, _ := c.NewRequest("GET", inURL, inBody)
|
||||||
|
|
||||||
// test relative URL was expanded
|
// test relative URL was expanded
|
||||||
|
|
|
@ -51,7 +51,7 @@ func (p *Pages) current() (int, error) {
|
||||||
|
|
||||||
// IsLastPage returns true if the current page is the last
|
// IsLastPage returns true if the current page is the last
|
||||||
func (l *Links) IsLastPage() bool {
|
func (l *Links) IsLastPage() bool {
|
||||||
if l == nil {
|
if l.Pages == nil {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return l.Pages.isLast()
|
return l.Pages.isLast()
|
||||||
|
|
|
@ -19,6 +19,7 @@ type Region struct {
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
Sizes []string `json:"sizes,omitempty"`
|
Sizes []string `json:"sizes,omitempty"`
|
||||||
Available bool `json:"available,omitempty`
|
Available bool `json:"available,omitempty`
|
||||||
|
Features []string `json:"features,omitempty`
|
||||||
}
|
}
|
||||||
|
|
||||||
type regionsRoot struct {
|
type regionsRoot struct {
|
||||||
|
|
Loading…
Reference in New Issue