Documentation ¶
Index ¶
- Constants
- Variables
- type API
- type APIError
- type BigAnimalError
- type ClusterClient
- func (c ClusterClient) ConnectionString(ctx context.Context, id string) (*models.ClusterConnection, error)
- func (c ClusterClient) Create(ctx context.Context, model any) (string, error)
- func (c ClusterClient) Delete(ctx context.Context, id string) error
- func (c ClusterClient) Read(ctx context.Context, id string) (*models.Cluster, error)
- func (c ClusterClient) ReadByName(ctx context.Context, name string) (*models.Cluster, error)
- func (c ClusterClient) Update(ctx context.Context, cluster *models.Cluster, id string) (*models.Cluster, error)
- type ClusterResponse
- type ErrorMessage
- type RegionClient
- func (c RegionClient) Create(ctx context.Context, model any) (string, error)
- func (c RegionClient) List(ctx context.Context, csp_id, query string) ([]*models.Region, error)
- func (c RegionClient) Read(ctx context.Context, csp_id, id string) (*models.Region, error)
- func (c RegionClient) Update(ctx context.Context, action, csp_id, region_id string) error
Constants ¶
View Source
const ( REGION_ACTIVE = "ACTIVE" REGION_INACTIVE = "INACTIVE" REGION_SUSPENDED = "SUSPENDED" )
Variables ¶
View Source
var ( Error404 = errors.New("resource not found") ErrorUnknown = errors.New("unknown API error") )
Functions ¶
This section is empty.
Types ¶
type API ¶
func (*API) ClusterClient ¶
func (api *API) ClusterClient() *ClusterClient
func (*API) RegionClient ¶
func (api *API) RegionClient() *RegionClient
type APIError ¶ added in v0.1.1
type APIError struct { Error struct { Status int `json:"status"` Message string `json:"message"` Errors []ErrorMessage `json:"errors"` Reference string `json:"reference"` Source string `json:"source"` } `json:"error"` }
type BigAnimalError ¶ added in v0.1.1
type BigAnimalError struct {
APIError APIError
}
func (*BigAnimalError) Error ¶ added in v0.1.1
func (baerr *BigAnimalError) Error() string
func (*BigAnimalError) GetDetails ¶ added in v0.1.1
func (baerr *BigAnimalError) GetDetails() string
type ClusterClient ¶
type ClusterClient struct{ API }
func NewClusterClient ¶
func NewClusterClient(api API) *ClusterClient
func (ClusterClient) ConnectionString ¶
func (c ClusterClient) ConnectionString(ctx context.Context, id string) (*models.ClusterConnection, error)
func (ClusterClient) ReadByName ¶
type ClusterResponse ¶
type ClusterResponse struct { Data struct { ClusterId string `json:"clusterId"` } `json:"data"` }
type ErrorMessage ¶ added in v0.1.1
type ErrorMessage struct {
Message string `json:"message"`
}
type RegionClient ¶
type RegionClient struct{ API }
func NewRegionClient ¶
func NewRegionClient(api API) *RegionClient
Click to show internal directories.
Click to hide internal directories.