Documentation ¶
Index ¶
- Variables
- type AivenErrorResponse
- type Client
- type CreateServiceInput
- type CreateServiceUserInput
- type CreateServiceUserResponse
- type DeleteServiceInput
- type DeleteServiceUserInput
- type ErrInvalidUpdate
- type GetServiceInput
- type GetServiceResponse
- type HttpClient
- func (a *HttpClient) CreateService(params *CreateServiceInput) (string, error)
- func (a *HttpClient) CreateServiceUser(params *CreateServiceUserInput) (string, error)
- func (a *HttpClient) DeleteService(params *DeleteServiceInput) error
- func (a *HttpClient) DeleteServiceUser(params *DeleteServiceUserInput) (string, error)
- func (a *HttpClient) GetServiceConnectionDetails(params *GetServiceInput) (string, string, error)
- func (a *HttpClient) GetServiceStatus(params *GetServiceInput) (ServiceStatus, time.Time, error)
- func (a *HttpClient) UpdateService(params *UpdateServiceInput) (string, error)
- type Service
- type ServiceStatus
- type ServiceUriParams
- type UpdateServiceInput
- type User
- type UserConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInstanceDoesNotExist = errors.New("Error deleting service: service instance does not exist")
Functions ¶
This section is empty.
Types ¶
type AivenErrorResponse ¶
type Client ¶
type Client interface { CreateService(params *CreateServiceInput) (string, error) GetServiceStatus(params *GetServiceInput) (ServiceStatus, time.Time, error) GetServiceConnectionDetails(params *GetServiceInput) (string, string, error) DeleteService(params *DeleteServiceInput) error CreateServiceUser(params *CreateServiceUserInput) (string, error) DeleteServiceUser(params *DeleteServiceUserInput) (string, error) UpdateService(params *UpdateServiceInput) (string, error) }
type CreateServiceInput ¶
type CreateServiceUserInput ¶
type DeleteServiceInput ¶
type DeleteServiceInput struct {
ServiceName string
}
type DeleteServiceUserInput ¶
type ErrInvalidUpdate ¶
type ErrInvalidUpdate struct {
Message string
}
func (ErrInvalidUpdate) Error ¶
func (p ErrInvalidUpdate) Error() string
type GetServiceInput ¶
type GetServiceInput struct {
ServiceName string
}
type GetServiceResponse ¶
type GetServiceResponse struct {
Service Service `json:"service"`
}
type HttpClient ¶
func NewHttpClient ¶
func NewHttpClient(baseURL, token, project string) *HttpClient
func (*HttpClient) CreateService ¶
func (a *HttpClient) CreateService(params *CreateServiceInput) (string, error)
func (*HttpClient) CreateServiceUser ¶
func (a *HttpClient) CreateServiceUser(params *CreateServiceUserInput) (string, error)
func (*HttpClient) DeleteService ¶
func (a *HttpClient) DeleteService(params *DeleteServiceInput) error
func (*HttpClient) DeleteServiceUser ¶
func (a *HttpClient) DeleteServiceUser(params *DeleteServiceUserInput) (string, error)
func (*HttpClient) GetServiceConnectionDetails ¶
func (a *HttpClient) GetServiceConnectionDetails(params *GetServiceInput) (string, string, error)
func (*HttpClient) GetServiceStatus ¶
func (a *HttpClient) GetServiceStatus(params *GetServiceInput) (ServiceStatus, time.Time, error)
func (*HttpClient) UpdateService ¶
func (a *HttpClient) UpdateService(params *UpdateServiceInput) (string, error)
type Service ¶
type Service struct { State ServiceStatus `json:"state"` UpdateTime time.Time `json:"update_time"` ServiceUriParams ServiceUriParams `json:"service_uri_params"` }
type ServiceStatus ¶
type ServiceStatus string
const ( Running ServiceStatus = "RUNNING" Rebuilding ServiceStatus = "REBUILDING" Rebalancing ServiceStatus = "REBALANCING" PowerOff ServiceStatus = "POWEROFF" )
type ServiceUriParams ¶
type UpdateServiceInput ¶
type UpdateServiceInput struct { ServiceName string `json:"-"` Plan string `json:"plan,omitempty"` UserConfig UserConfig `json:"user_config"` }
type UserConfig ¶
Click to show internal directories.
Click to hide internal directories.