Documentation
¶
Index ¶
- Constants
- func MakeRequest(cfg *clicfg.Config, path string, config *RequestConfig) (responseBody []byte, statusCode int, err error)
- type CreateCMKResponse
- type CreateGraphQLDataApiResponse
- type CreateInstanceResponse
- type CreateSnapshotResponse
- type Error
- type ErrorResponse
- type Grant
- type ListResponseData
- type PollResponse
- func Poll(cfg *clicfg.Config, url string, cond func(status string) bool) (*PollResponse, error)
- func PollCMK(cfg *clicfg.Config, cmkId string) (*PollResponse, error)
- func PollGraphQLDataApi(cfg *clicfg.Config, instanceId string, graphQLDataApiId string, ...) (*PollResponse, error)
- func PollInstance(cfg *clicfg.Config, instanceId string, waitingStatus string) (*PollResponse, error)
- func PollSnapshot(cfg *clicfg.Config, instanceId string, snapshotId string) (*PollResponse, error)
- type RequestConfig
- type ResponseData
- type ServerError
- type SingleValueResponseData
Constants ¶
View Source
const ( InstanceStatusCreating string = "creating" InstanceStatusDestroying string = "destroying" InstanceStatusRunning string = "running" InstanceStatusPausing string = "pausing" InstanceStatusPaused string = "paused" InstanceStatusSuspending string = "suspending" InstanceStatusSuspended string = "suspended" InstanceStatusResuming string = "resuming" InstanceStatusLoading string = "loading" InstanceStatusLoadingFailed string = "loading failed" InstanceStatusRestoring string = "restoring" InstanceStatusUpdating string = "updating" InstanceStatusOverwriting string = "overwriting" )
View Source
const ( SnapshotStatusPending string = "Pending" SnapshotStatusCompleted string = "Completed" SnapshotStatusInProgress string = "InProgress" SnapshotStatusFailed string = "Failed" )
View Source
const ( CMKStatusReady = "ready" CMKStatusPending = "pending" )
View Source
const ( GraphQLDataApiStatusReady = "ready" GraphQLDataApiStatusCreating = "creating" GraphQLDataApiStatusUpdating = "updating" GraphQLDataApiStatusDeleting = "deleting" GraphQLDataApiStatusPausing = "pausing" GraphQLDataApiStatusResuming = "resuming" GraphQLDataApiStatusPaused = "paused" GraphQLDataApiStatusError = "error" )
View Source
const ( GraphQLDataApiAuthProviderTypeJwks = "jwks" GraphQLDataApiAuthProviderTypeApiKey = "api-key" )
Variables ¶
This section is empty.
Functions ¶
func MakeRequest ¶
Types ¶
type CreateCMKResponse ¶
Response Body of Create and Get Instance for successful requests
type CreateGraphQLDataApiResponse ¶
type CreateGraphQLDataApiResponse struct { Data struct { Id string Name string Status string Url string AuthenticationProviders []struct { Id string Name string Type string Enabled bool Key string `json:"key,omitempty"` Url string `json:"url,omitempty"` } `json:"authentication_providers"` } }
Response Body of Create GraphQL Data API for successful requests
type CreateInstanceResponse ¶
type CreateInstanceResponse struct { Data struct { Id string ConnectionUrl string `json:"connection_url"` Username string Password string TenantId string `json:"tenant_id"` CloudProvider string `json:"cloud_provider"` Region string Type string Name string } }
Response Body of Create and Get Instance for successful requests
type CreateSnapshotResponse ¶
type CreateSnapshotResponse struct { Data struct { SnapshotId string `json:"snapshot_id"` } }
Response Body of Create and Get Instance for successful requests
type ErrorResponse ¶
type ErrorResponse struct {
Errors []Error `json:"errors"`
}
type ListResponseData ¶
func (ListResponseData) AsArray ¶
func (d ListResponseData) AsArray() []map[string]any
func (ListResponseData) GetSingleOrError ¶
func (d ListResponseData) GetSingleOrError() (map[string]any, error)
type RequestConfig ¶
type ResponseData ¶
type ResponseData interface { AsArray() []map[string]any GetSingleOrError() (map[string]any, error) }
func NewResponseData ¶
func NewResponseData(data []map[string]any) ResponseData
func NewSingleValueResponseData ¶
func NewSingleValueResponseData(data map[string]any) ResponseData
func ParseBody ¶
func ParseBody(body []byte) ResponseData
type ServerError ¶
type ServerError struct {
Error string `json:"error"`
}
type SingleValueResponseData ¶
type SingleValueResponseData struct { Data map[string]any `json:"data"` Errors []map[string]any `json:"errors,omitempty"` }
func (SingleValueResponseData) AsArray ¶
func (d SingleValueResponseData) AsArray() []map[string]any
func (SingleValueResponseData) GetSingleOrError ¶
func (d SingleValueResponseData) GetSingleOrError() (map[string]any, error)
Click to show internal directories.
Click to hide internal directories.