Documentation ¶
Index ¶
- type APIError
- type Client
- type CreateInstanceParams
- type Instance
- type InstanceService
- func (s *InstanceService) Create(params *CreateInstanceParams) (*Instance, *http.Response, error)
- func (s *InstanceService) CreateAndWait(params *CreateInstanceParams, timeoutInSeconds float64) (*Instance, *http.Response, error)
- func (s *InstanceService) Delete(id int) (*http.Response, error)
- func (s *InstanceService) Get(id int) (*Instance, *http.Response, error)
- func (s *InstanceService) List() ([]Instance, *http.Response, error)
- func (s *InstanceService) Update(id int, params *UpdateInstanceParams) (*Instance, *http.Response, error)
- type UpdateInstanceParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError map[string]interface{}
APIError represents a CloudAMQP API Error response
type Client ¶
type Client struct { Instances *InstanceService // contains filtered or unexported fields }
Client is a sling client for instance resources
type CreateInstanceParams ¶
type CreateInstanceParams struct { Name string `url:"name"` Plan string `url:"plan"` Region string `url:"region"` VpcSubnet string `url:"vpc_subnet,omitempty"` Nodes int `url:"nodes,omitempty"` RmqVersion string `url:"rmq_version,omitempty"` }
CreateInstanceParams are the parameters for OrganizationService.Create.
type Instance ¶
type Instance struct { ID int `json:"id"` Plan string `json:"plan"` Region string `json:"region"` Name string `json:"name"` URL string `json:"url,omitempty"` APIKey string `json:"apikey,omitempty"` }
Instance represents a CloudAMQP instance. Based on https://customer.cloudamqp.com/team/api.
type InstanceService ¶
type InstanceService struct {
// contains filtered or unexported fields
}
InstanceService provides methods for accessing CloudAMQP instance API endpoints. https://customer.cloudamqp.com/team/api
func (*InstanceService) Create ¶
func (s *InstanceService) Create(params *CreateInstanceParams) (*Instance, *http.Response, error)
Create a new CloudAMP instance. https://customer.cloudamqp.com/team/api
func (*InstanceService) CreateAndWait ¶
func (s *InstanceService) CreateAndWait(params *CreateInstanceParams, timeoutInSeconds float64) (*Instance, *http.Response, error)
CreateAndWait Create a new CloudAMP instance and waits for it to be available https://customer.cloudamqp.com/team/api
func (*InstanceService) Delete ¶
func (s *InstanceService) Delete(id int) (*http.Response, error)
Delete a CloudAMQP instance. https://customer.cloudamqp.com/team/api
func (*InstanceService) Get ¶
Get a CloudAMQP instance. https://customer.cloudamqp.com/team/api
func (*InstanceService) List ¶
func (s *InstanceService) List() ([]Instance, *http.Response, error)
List instances available to the authenticated session. https://customer.cloudamqp.com/team/api
func (*InstanceService) Update ¶
func (s *InstanceService) Update(id int, params *UpdateInstanceParams) (*Instance, *http.Response, error)
Update a CloudAMQP instance. https://customer.cloudamqp.com/team/api
type UpdateInstanceParams ¶
type UpdateInstanceParams struct { Name string `url:"name,omitempty"` Plan string `url:"plan,omitempty"` Nodes int `url:"nodes,omitempty"` }
UpdateInstanceParams are the parameters for OrganizationService.Create.