user

package
v0.0.0-...-12fbc85 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultComputeDiskSize = 20

Variables

View Source
var ValidateDiskSize validator.Func = func(fl validator.FieldLevel) bool {
	diskSize := fl.Field().Interface().(string)

	diskSizeInt, err := strconv.Atoi(strings.TrimSpace(diskSize))
	if err != nil {
		return false
	}

	return diskSizeInt < 10 || diskSizeInt <= 200
}

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(repo *database.Repo, gcpProject, gcpRegion, gcpZone string, dryRun bool) *Client

func (Client) CreateComputeInstance

func (c Client) CreateComputeInstance(ctx context.Context, instance *gensql.ComputeInstance) error

func (Client) CreateUserGSM

func (c Client) CreateUserGSM(ctx context.Context, manager *gensql.UserGoogleSecretManager) error

func (Client) DeleteComputeInstance

func (c Client) DeleteComputeInstance(ctx context.Context, email string) error

func (Client) DeleteUserGSM

func (c Client) DeleteUserGSM(ctx context.Context, email string) error

func (Client) ResizeComputeInstanceDisk

func (c Client) ResizeComputeInstanceDisk(ctx context.Context, instance *gensql.ComputeInstance) error

Jump to

Keyboard shortcuts

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