utils

package
v0.1.0-test-notarizati... Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInstanceName

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

func GetInstanceReplicas

func GetInstanceReplicas(instanceType string) (int64, error)

func GetInstanceType

func GetInstanceType(numReplicas int64) (string, error)

func GetUserName

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

func LoadFlavorId

func LoadFlavorId(service string, cpu, ram int64, flavors *[]mongodbflex.HandlersInfraFlavor) (*string, error)

func ValidateFlavorId

func ValidateFlavorId(service, flavorId string, flavors *[]mongodbflex.HandlersInfraFlavor) error

func ValidateStorage

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

Types

type MongoDBFlexClient

type MongoDBFlexClient interface {
	GetInstanceExecute(ctx context.Context, projectId, instanceId string) (*mongodbflex.GetInstanceResponse, error)
	GetUserExecute(ctx context.Context, projectId, instanceId, userId string) (*mongodbflex.GetUserResponse, error)
}

Jump to

Keyboard shortcuts

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