sqlserverflexbeta

package
v0.0.23-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InstanceStateEmpty       = ""
	InstanceStateSuccess     = "READY"
	InstanceStatePending     = "PENDING"
	InstanceStateProcessing  = "PROGRESSING"
	InstanceStateFailed      = "FAILURE"
	InstanceStateUnknown     = "UNKNOWN"
	InstanceStateTerminating = "TERMINATING"
)

READY, PENDING, PROGRESSING, FAILURE, UNKNOWN,

Variables

This section is empty.

Functions

func CreateDatabaseWaitHandler

func CreateDatabaseWaitHandler(
	ctx context.Context,
	a APIClientInterface,
	projectId, instanceId, region, databaseName string,
) *wait.AsyncActionHandler[sqlserverflex.GetDatabaseResponse]

CreateDatabaseWaitHandler will wait for instance creation

func CreateInstanceWaitHandler

func CreateInstanceWaitHandler(
	ctx context.Context,
	a APIClientInterface,
	projectId, instanceId, region string,
) *wait.AsyncActionHandler[sqlserverflex.GetInstanceResponse]

CreateInstanceWaitHandler will wait for instance creation

func CreateUserWaitHandler

func CreateUserWaitHandler(
	ctx context.Context,
	a APIClientInterface,
	projectId, instanceId, region string,
	userId int64,
) *wait.AsyncActionHandler[sqlserverflex.GetUserResponse]

CreateUserWaitHandler will wait for instance creation

func DeleteInstanceWaitHandler

func DeleteInstanceWaitHandler(
	ctx context.Context,
	a APIClientInterface,
	projectId, instanceId, region string,
) *wait.AsyncActionHandler[sqlserverflex.GetInstanceResponse]

DeleteInstanceWaitHandler will wait for instance deletion

func DeleteUserWaitHandler

func DeleteUserWaitHandler(
	ctx context.Context,
	a APIClientInterface,
	projectId, region, instanceId string,
	userId int64,
) *wait.AsyncActionHandler[struct{}]

DeleteUserWaitHandler will wait for instance deletion

func UpdateInstanceWaitHandler

func UpdateInstanceWaitHandler(
	ctx context.Context,
	a APIClientInterface,
	projectId, instanceId, region string,
) *wait.AsyncActionHandler[sqlserverflex.GetInstanceResponse]

UpdateInstanceWaitHandler will wait for instance update

func WaitForUserWaitHandler

func WaitForUserWaitHandler(
	ctx context.Context,
	a APIClientInterface,
	projectId, instanceId, region, userName string,
) *wait.AsyncActionHandler[sqlserverflex.ListUserResponse]

WaitForUserWaitHandler will wait for instance creation

Types

type APIClientInterface

type APIClientInterface interface {
	GetInstanceRequestExecute(
		ctx context.Context,
		projectId, region, instanceId string,
	) (*sqlserverflex.GetInstanceResponse, error)
	GetDatabaseRequestExecute(
		ctx context.Context,
		projectId string,
		region string,
		instanceId string,
		databaseName string,
	) (*sqlserverflex.GetDatabaseResponse, error)
	GetUserRequestExecute(
		ctx context.Context,
		projectId string,
		region string,
		instanceId string,
		userId int64,
	) (*sqlserverflex.GetUserResponse, error)

	ListRolesRequestExecute(
		ctx context.Context,
		projectId string,
		region string,
		instanceId string,
	) (*sqlserverflex.ListRolesResponse, error)

	ListUsersRequest(ctx context.Context, projectId string, region string, instanceId string) sqlserverflex.ApiListUsersRequestRequest

	ListUsersRequestExecute(
		ctx context.Context,
		projectId string,
		region string,
		instanceId string,
	) (*sqlserverflex.ListUserResponse, error)
}

APIClientInterface Interface needed for tests

type APIClientUserInterface

type APIClientUserInterface interface {
	DeleteUserRequestExecute(
		ctx context.Context,
		projectId string,
		region string,
		instanceId string,
		userId int64,
	) error
}

APIClientUserInterface Interface needed for tests

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL