Documentation ¶
Index ¶
- Constants
- Variables
- func NewMultipleClustersSameNameError() error
- type API
- func (api *API) CSPTagClient() *CSPTagClient
- func (api *API) CloudProviderClient() *CloudProviderClient
- func (api *API) ClusterClient() *ClusterClient
- func (api *API) PGDClient() *PGDClient
- func (api *API) ProjectClient() *ProjectClient
- func (api *API) RegionClient() *RegionClient
- func (api *API) TagClient() *TagClient
- type APIError
- type BigAnimalError
- type CSPTagClient
- type CloudProviderClient
- func (c CloudProviderClient) CreateAWSConnection(ctx context.Context, projectID string, conn models.AWSConnection) error
- func (c CloudProviderClient) CreateAzureConnection(ctx context.Context, projectID string, conn models.AzureConnection) error
- func (c CloudProviderClient) GetAWSConnection(ctx context.Context, projectID string) (*models.AWSConnection, error)
- type ClusterClient
- func (c ClusterClient) ConnectionString(ctx context.Context, projectId, id string) (*models.ClusterConnection, error)
- func (c ClusterClient) Create(ctx context.Context, projectId string, model any) (string, error)
- func (c ClusterClient) Delete(ctx context.Context, projectId, id string) error
- func (c ClusterClient) GetPeAllowedPrincipalIds(ctx context.Context, projectID string, cspID string, regionID string) (*models.PeAllowedPrincipalIds, error)
- func (c ClusterClient) GetServiceAccountIds(ctx context.Context, projectID string, cspID string, regionID string) (*models.ServiceAccountIds, error)
- func (c ClusterClient) Read(ctx context.Context, projectId, id string) (*models.Cluster, error)
- func (c ClusterClient) ReadByName(ctx context.Context, projectId, name string, most_recent bool) (*models.Cluster, error)
- func (c ClusterClient) Update(ctx context.Context, cluster *models.Cluster, projectId, id string) (*models.Cluster, error)
- type ClusterResponse
- type CommonCluster
- type ErrorMessage
- type PGDClient
- func (c PGDClient) CalculateWitnessGroupParams(ctx context.Context, projectId string, ...) (*pgdApi.WitnessGroupParamsData, error)
- func (c PGDClient) Create(ctx context.Context, projectId string, model any) (string, error)
- func (c PGDClient) Delete(ctx context.Context, projectId, id string) error
- func (c PGDClient) GetPeAllowedPrincipalIds(ctx context.Context, projectID string, cspID string, regionID string) (*models.PeAllowedPrincipalIds, error)
- func (c PGDClient) GetServiceAccountIds(ctx context.Context, projectID string, cspID string, regionID string) (*models.ServiceAccountIds, error)
- func (c PGDClient) Read(ctx context.Context, projectId, clusterId string) (*models.Cluster, error)
- func (c PGDClient) ReadByName(ctx context.Context, projectId, name string, most_recent bool) (*models.Cluster, error)
- func (c PGDClient) Update(ctx context.Context, projectId, clusterId string, model models.Cluster) (string, error)
- type ProjectClient
- func (c ProjectClient) Create(ctx context.Context, model any) (string, error)
- func (c ProjectClient) Delete(ctx context.Context, projectId string) error
- func (c ProjectClient) List(ctx context.Context, query string) ([]*models.Project, error)
- func (c ProjectClient) Read(ctx context.Context, id string) (*models.Project, error)
- func (c ProjectClient) Update(ctx context.Context, projectId, model any) (string, error)
- type RegionClient
- func (c RegionClient) Create(ctx context.Context, model any) (string, error)
- func (c RegionClient) List(ctx context.Context, project_id, csp_id, query string) ([]*models.Region, error)
- func (c RegionClient) Read(ctx context.Context, project_id, csp_id, id string) (*models.Region, error)
- func (c RegionClient) Update(ctx context.Context, action, project_id, csp_id, region_id string, ...) error
- type TagClient
- func (tc TagClient) Create(ctx context.Context, tagReq api.TagRequest) (*string, error)
- func (tc TagClient) Delete(ctx context.Context, tagId string) error
- func (tc TagClient) Get(ctx context.Context, tagId string) (api.TagResponse, error)
- func (tc TagClient) List(ctx context.Context) ([]api.TagResponse, error)
- func (tc TagClient) Update(ctx context.Context, tagId string, tagReq api.TagRequest) (*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") ErrorClustersSameName = NewMultipleClustersSameNameError() )
Functions ¶
func NewMultipleClustersSameNameError ¶ added in v0.3.0
func NewMultipleClustersSameNameError() error
Types ¶
type API ¶
type API struct { BaseURL string Token string AccessKey string UserAgent string HTTPClient http.Client }
func (*API) CSPTagClient ¶ added in v1.1.0
func (api *API) CSPTagClient() *CSPTagClient
func (*API) CloudProviderClient ¶ added in v0.4.0
func (api *API) CloudProviderClient() *CloudProviderClient
func (*API) ClusterClient ¶
func (api *API) ClusterClient() *ClusterClient
func (*API) ProjectClient ¶ added in v0.3.0
func (api *API) ProjectClient() *ProjectClient
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 CSPTagClient ¶ added in v1.1.0
type CSPTagClient struct {
API
}
func NewCSPTagClient ¶ added in v1.1.0
func NewCSPTagClient(api API) *CSPTagClient
func (CSPTagClient) Delete ¶ added in v1.1.0
func (tc CSPTagClient) Delete(ctx context.Context, tagId string) error
func (CSPTagClient) Get ¶ added in v1.1.0
func (c CSPTagClient) Get(ctx context.Context, projectID, cloudProviderID string) (*api.CSPTagResponse, error)
func (CSPTagClient) Put ¶ added in v1.1.0
func (c CSPTagClient) Put(ctx context.Context, projectID, cloudProviderID string, cspTagReq api.CSPTagRequest) (bool, error)
type CloudProviderClient ¶ added in v0.4.0
type CloudProviderClient struct{ API }
func NewCloudProviderClient ¶ added in v0.4.0
func NewCloudProviderClient(api API) *CloudProviderClient
func (CloudProviderClient) CreateAWSConnection ¶ added in v0.4.0
func (c CloudProviderClient) CreateAWSConnection(ctx context.Context, projectID string, conn models.AWSConnection) error
func (CloudProviderClient) CreateAzureConnection ¶ added in v0.4.0
func (c CloudProviderClient) CreateAzureConnection(ctx context.Context, projectID string, conn models.AzureConnection) error
func (CloudProviderClient) GetAWSConnection ¶ added in v0.4.0
func (c CloudProviderClient) GetAWSConnection(ctx context.Context, projectID string) (*models.AWSConnection, error)
type ClusterClient ¶
type ClusterClient struct { API CommonCluster }
func NewClusterClient ¶
func NewClusterClient(api API) *ClusterClient
func (ClusterClient) ConnectionString ¶
func (c ClusterClient) ConnectionString(ctx context.Context, projectId, id string) (*models.ClusterConnection, error)
func (ClusterClient) Delete ¶
func (c ClusterClient) Delete(ctx context.Context, projectId, id string) error
func (ClusterClient) GetPeAllowedPrincipalIds ¶ added in v0.6.1
func (c ClusterClient) GetPeAllowedPrincipalIds(ctx context.Context, projectID string, cspID string, regionID string) (*models.PeAllowedPrincipalIds, error)
func (ClusterClient) GetServiceAccountIds ¶ added in v0.6.1
func (c ClusterClient) GetServiceAccountIds(ctx context.Context, projectID string, cspID string, regionID string) (*models.ServiceAccountIds, error)
func (ClusterClient) ReadByName ¶
type ClusterResponse ¶
type ClusterResponse struct { Data struct { ClusterId string `json:"clusterId"` } `json:"data"` }
type CommonCluster ¶ added in v0.9.0
type CommonCluster struct {
API
}
func (CommonCluster) ClusterPause ¶ added in v0.9.0
func (CommonCluster) ClusterResume ¶ added in v0.9.0
type ErrorMessage ¶ added in v0.1.1
type ErrorMessage struct {
Message string `json:"message"`
}
type PGDClient ¶ added in v0.5.0
type PGDClient struct { API CommonCluster }
func NewPGDClient ¶ added in v0.5.0
func (PGDClient) CalculateWitnessGroupParams ¶ added in v0.5.0
func (c PGDClient) CalculateWitnessGroupParams(ctx context.Context, projectId string, WitnessGroupParamsBody pgdApi.WitnessGroupParamsBody) (*pgdApi.WitnessGroupParamsData, error)
func (PGDClient) GetPeAllowedPrincipalIds ¶ added in v0.6.1
func (PGDClient) GetServiceAccountIds ¶ added in v0.6.1
func (PGDClient) ReadByName ¶ added in v0.5.0
type ProjectClient ¶ added in v0.3.0
type ProjectClient struct{ API }
func NewProjectClient ¶ added in v0.3.0
func NewProjectClient(api API) *ProjectClient
func (ProjectClient) Delete ¶ added in v0.3.0
func (c ProjectClient) Delete(ctx context.Context, projectId string) error
type RegionClient ¶
type RegionClient struct{ API }
func NewRegionClient ¶
func NewRegionClient(api API) *RegionClient
Click to show internal directories.
Click to hide internal directories.