Documentation
¶
Index ¶
- Constants
- func CreateInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, ...) *wait.AsyncActionHandler[postgresflex.GetInstanceResponse]
- func GetDatabaseByIdWaitHandler(ctx context.Context, a APIClientUserInterface, ...) *wait.AsyncActionHandler[postgresflex.GetDatabaseResponse]
- func GetUserByIdWaitHandler(ctx context.Context, a APIClientUserInterface, ...) *wait.AsyncActionHandler[postgresflex.GetUserResponse]
- func PartialUpdateInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, ...) *wait.AsyncActionHandler[postgresflex.GetInstanceResponse]
- type APIClientInstanceInterface
- type APIClientUserInterface
Constants ¶
View Source
const ( InstanceStateEmpty = "" InstanceStateProgressing = "PROGRESSING" InstanceStateSuccess = "READY" InstanceStateFailed = "FAILURE" InstanceStateTerminating = "TERMINATING" InstanceStateUnknown = "UNKNOWN" InstanceStatePending = "PENDING" )
"READY" "PENDING" "PROGRESSING" "FAILURE" "UNKNOWN" "TERMINATING"
Variables ¶
This section is empty.
Functions ¶
func CreateInstanceWaitHandler ¶
func CreateInstanceWaitHandler( ctx context.Context, a APIClientInstanceInterface, projectId, region, instanceId string, ) *wait.AsyncActionHandler[postgresflex.GetInstanceResponse]
CreateInstanceWaitHandler will wait for instance creation
func GetDatabaseByIdWaitHandler ¶
func GetDatabaseByIdWaitHandler( ctx context.Context, a APIClientUserInterface, projectId, instanceId, region string, databaseId int64, ) *wait.AsyncActionHandler[postgresflex.GetDatabaseResponse]
GetDatabaseByIdWaitHandler will wait for instance creation
func GetUserByIdWaitHandler ¶
func GetUserByIdWaitHandler( ctx context.Context, a APIClientUserInterface, projectId, instanceId, region string, userId int64, ) *wait.AsyncActionHandler[postgresflex.GetUserResponse]
GetUserByIdWaitHandler will wait for instance creation
func PartialUpdateInstanceWaitHandler ¶
func PartialUpdateInstanceWaitHandler( ctx context.Context, a APIClientInstanceInterface, projectId, region, instanceId string, ) *wait.AsyncActionHandler[postgresflex.GetInstanceResponse]
PartialUpdateInstanceWaitHandler will wait for instance update
Types ¶
type APIClientInstanceInterface ¶
type APIClientInstanceInterface interface {
GetInstanceRequestExecute(ctx context.Context, projectId, region, instanceId string) (
*postgresflex.GetInstanceResponse,
error,
)
ListUsersRequestExecute(
ctx context.Context,
projectId string,
region string,
instanceId string,
) (*postgresflex.ListUserResponse, error)
}
APIClientInstanceInterface Interface needed for tests
type APIClientUserInterface ¶
type APIClientUserInterface interface {
GetUserRequestExecute(ctx context.Context, projectId, region, instanceId string, userId int32) (
*postgresflex.GetUserResponse,
error,
)
GetDatabaseRequestExecute(
ctx context.Context,
projectId string,
region string,
instanceId string,
databaseId int32,
) (*postgresflex.GetDatabaseResponse, error)
}
APIClientUserInterface Interface needed for tests
Click to show internal directories.
Click to hide internal directories.