-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfigurations.go
More file actions
37 lines (31 loc) · 940 Bytes
/
configurations.go
File metadata and controls
37 lines (31 loc) · 940 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package vscale
type ConfigurationsService interface {
Rplans() (*[]Rplan, *Response, error)
}
type Rplan struct {
ID string `json:"id,omitempty"`
Memory int `json:"memory,omitempty"`
Disk int `json:"disk,omitempty"`
Locations []string `json:"locations,omitempty"`
Network int `json:"network,omitempty"`
Addresses int `json:"addresses,omitempty"`
Cpus int `json:"cpus,omitempty"`
Templates []string `json:"templates,omitempty"`
}
type ConfigurationsServiceOp struct {
client *Client
}
var _ ConfigurationsService = &ConfigurationsServiceOp{}
func (s *ConfigurationsServiceOp) Rplans() (*[]Rplan, *Response, error) {
path := "/v1/rplans"
req, err := s.client.NewRequest("GET", path, nil)
if err != nil {
return nil, nil, err
}
collection := &[]Rplan{}
resp, err := s.client.Do(req, collection)
if err != nil {
return nil, nil, err
}
return collection, resp, err
}