Documentation
¶
Index ¶
- Variables
- type AivenErrorResponse
- type Client
- type CommonUserConfig
- type CreateServiceInput
- type CreateServiceUserInput
- type CreateServiceUserResponse
- type DeleteServiceInput
- type DeleteServiceUserInput
- type ErrInvalidUpdate
- type ForkServiceInput
- type GetServiceInput
- type GetServiceResponse
- type GetServiceTagsInput
- type GetServiceTagsResponse
- 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) ForkService(params *ForkServiceInput) (string, error)
- func (a *HttpClient) GetService(params *GetServiceInput) (*Service, error)
- func (a *HttpClient) GetServiceTags(params *GetServiceTagsInput) (*ServiceTags, error)
- func (a *HttpClient) UpdateService(params *UpdateServiceInput) (string, error)
- func (a *HttpClient) UpdateServiceTags(params *UpdateServiceTagsInput) (string, error)
- type InfluxDBUserConfig
- type OpenSearchUserConfig
- type Service
- type ServiceBackup
- type ServiceStatus
- type ServiceTags
- type ServiceUriParams
- type UpdateServiceInput
- type UpdateServiceTagsInput
- type User
- type UserConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInstanceDoesNotExist = errors.New("Error: service instance does not exist")
View Source
var ErrInstanceUserDoesNotExist = errors.New("Error: service instance user does not exist")
Functions ¶
This section is empty.
Types ¶
type AivenErrorResponse ¶
type Client ¶
type Client interface { CreateService(params *CreateServiceInput) (string, error) GetService(params *GetServiceInput) (*Service, error) GetServiceTags(params *GetServiceTagsInput) (*ServiceTags, error) DeleteService(params *DeleteServiceInput) error CreateServiceUser(params *CreateServiceUserInput) (string, error) DeleteServiceUser(params *DeleteServiceUserInput) (string, error) UpdateService(params *UpdateServiceInput) (string, error) UpdateServiceTags(params *UpdateServiceTagsInput) (string, error) ForkService(params *ForkServiceInput) (string, error) }
type CommonUserConfig ¶ added in v0.22.0
type CreateServiceInput ¶
type CreateServiceInput struct { Cloud string `json:"cloud,omitempty"` GroupName string `json:"group_name,omitempty"` Plan string `json:"plan,omitempty"` ServiceName string `json:"service_name"` ServiceType string `json:"service_type"` UserConfig UserConfig `json:"user_config"` Tags ServiceTags `json:"tags"` }
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 ForkServiceInput ¶ added in v0.38.0
type ForkServiceInput struct { Cloud string `json:"cloud,omitempty"` GroupName string `json:"group_name,omitempty"` Plan string `json:"plan,omitempty"` ServiceName string `json:"service_name"` ServiceType string `json:"service_type"` UserConfig UserConfig `json:"user_config"` Tags ServiceTags `json:"tags"` }
type GetServiceInput ¶
type GetServiceInput struct {
ServiceName string
}
type GetServiceResponse ¶
type GetServiceResponse struct {
Service Service `json:"service"`
}
type GetServiceTagsInput ¶ added in v0.38.0
type GetServiceTagsInput struct {
ServiceName string
}
type GetServiceTagsResponse ¶ added in v0.38.0
type GetServiceTagsResponse struct {
Tags ServiceTags `json:""`
}
type HttpClient ¶
type HttpClient struct { BaseURL string Token string Project string HTTPClient *http.Client // contains filtered or unexported fields }
func NewHttpClient ¶
func NewHttpClient(baseURL, token, project string, logger lager.Logger) *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) ForkService ¶ added in v0.38.0
func (a *HttpClient) ForkService(params *ForkServiceInput) (string, error)
func (*HttpClient) GetService ¶ added in v0.22.0
func (a *HttpClient) GetService(params *GetServiceInput) (*Service, error)
func (*HttpClient) GetServiceTags ¶ added in v0.38.0
func (a *HttpClient) GetServiceTags(params *GetServiceTagsInput) (*ServiceTags, error)
func (*HttpClient) UpdateService ¶
func (a *HttpClient) UpdateService(params *UpdateServiceInput) (string, error)
func (*HttpClient) UpdateServiceTags ¶ added in v0.38.0
func (a *HttpClient) UpdateServiceTags(params *UpdateServiceTagsInput) (string, error)
type InfluxDBUserConfig ¶ added in v0.22.0
type InfluxDBUserConfig struct{}
type OpenSearchUserConfig ¶ added in v0.38.0
type OpenSearchUserConfig struct {
OpenSearchVersion string `json:"opensearch_version,omitempty"`
}
type Service ¶
type Service struct { State ServiceStatus `json:"state"` UpdateTime time.Time `json:"update_time"` ServiceUriParams ServiceUriParams `json:"service_uri_params"` ServiceType string `json:"service_type"` Backups []ServiceBackup `json:"backups"` Plan string `json:"plan"` }
type ServiceBackup ¶ added in v0.38.0
type ServiceStatus ¶
type ServiceStatus string
const ( Running ServiceStatus = "RUNNING" Rebuilding ServiceStatus = "REBUILDING" Rebalancing ServiceStatus = "REBALANCING" PowerOff ServiceStatus = "POWEROFF" Missing ServiceStatus = "MISSING" )
type ServiceTags ¶ added in v0.38.0
type ServiceTags struct { DeployEnv string `json:"deploy_env"` ServiceID string `json:"service_id"` PlanID string `json:"plan_id"` OrganizationID string `json:"organization_id"` SpaceID string `json:"space_id"` BrokerName string `json:"broker_name"` RestoredFromBackup string `json:"restored_from_backup"` OriginServiceID string `json:"restored_from_service"` RestoredFromTime time.Time `json:"restored_from_time"` }
type ServiceUriParams ¶
type UpdateServiceInput ¶
type UpdateServiceInput struct { ServiceName string `json:"-"` Plan string `json:"plan,omitempty"` UserConfig UserConfig `json:"user_config"` }
type UpdateServiceTagsInput ¶ added in v0.38.0
type UpdateServiceTagsInput struct { ServiceName string `json:"-"` Tags ServiceTags `json:"tags"` }
type UserConfig ¶
type UserConfig struct { CommonUserConfig OpenSearchUserConfig InfluxDBUserConfig }
Click to show internal directories.
Click to hide internal directories.