utils

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvailableInstanceTypes

func AvailableInstanceTypes() []string

func GetInstanceName

func GetInstanceName(ctx context.Context, apiClient PostgresFlexClient, projectId, instanceId string) (string, error)

func GetInstanceReplicas

func GetInstanceReplicas(instanceType string) (int64, error)

func GetInstanceStatus

func GetInstanceStatus(ctx context.Context, apiClient PostgresFlexClient, projectId, instanceId string) (string, error)

func GetInstanceType

func GetInstanceType(numReplicas int64) (string, error)

func GetLatestPostgreSQLVersion

func GetLatestPostgreSQLVersion(ctx context.Context, apiClient PostgresFlexClient, projectId string) (string, error)

func GetUserName

func GetUserName(ctx context.Context, apiClient PostgresFlexClient, projectId, instanceId, userId string) (string, error)

func LoadFlavorId

func LoadFlavorId(cpu, ram int64, flavors *[]postgresflex.Flavor) (*string, error)

func ValidateFlavorId

func ValidateFlavorId(flavorId string, flavors *[]postgresflex.Flavor) error

func ValidateStorage

func ValidateStorage(storageClass *string, storageSize *int64, storages *postgresflex.ListStoragesResponse, flavorId string) error

Types

type PostgresFlexClient

type PostgresFlexClient interface {
	ListVersionsExecute(ctx context.Context, projectId string) (*postgresflex.ListVersionsResponse, error)
	GetInstanceExecute(ctx context.Context, projectId, instanceId string) (*postgresflex.InstanceResponse, error)
	GetUserExecute(ctx context.Context, projectId, instanceId, userId string) (*postgresflex.GetUserResponse, error)
}

Jump to

Keyboard shortcuts

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