database

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package database holds shared types and helpers for the databases subcommands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service performs authenticated Volcano database workflows.

func NewService

func NewService(deps cliruntime.Deps) Service

NewService returns a database service.

func (Service) Create

func (s Service) Create(ctx context.Context, name, region, pgVersion, databaseType string) (*apiclient.Database, error)

Create creates a database in the current project.

func (Service) CreateBranch added in v0.21.0

func (s Service) CreateBranch(ctx context.Context, databaseName, branchName string, ttlSeconds *int64) (*apiclient.DatabaseBranch, error)

CreateBranch forks a branch off a database in the current project.

func (Service) Delete

func (s Service) Delete(ctx context.Context, name string) error

Delete deletes one database in the current project by name.

func (Service) DeleteBranch added in v0.21.0

func (s Service) DeleteBranch(ctx context.Context, databaseName, branchName string) error

DeleteBranch deletes one branch of a database in the current project.

func (Service) ExtendBranch added in v0.21.0

func (s Service) ExtendBranch(ctx context.Context, databaseName, branchName string, ttlSeconds int64) (*apiclient.DatabaseBranch, error)

ExtendBranch re-arms a branch's lifetime from now.

func (Service) Get

func (s Service) Get(ctx context.Context, name string) (*apiclient.Database, error)

Get returns one database in the current project by name.

func (Service) GetBranch added in v0.21.0

func (s Service) GetBranch(ctx context.Context, databaseName, branchName string) (*apiclient.DatabaseBranch, error)

GetBranch returns one branch of a database in the current project.

func (Service) ListBranches added in v0.21.0

func (s Service) ListBranches(ctx context.Context, databaseName string) ([]apiclient.DatabaseBranch, error)

ListBranches returns every branch of a database in the current project.

func (Service) ListPage

func (s Service) ListPage(ctx context.Context, page, limit int) (*apiclient.PaginatedDatabases, error)

ListPage returns one database page in the current project.

func (Service) ResetBranch added in v0.21.0

func (s Service) ResetBranch(ctx context.Context, databaseName, branchName string) (*apiclient.DatabaseBranch, error)

ResetBranch discards a branch's changes and re-forks it from the parent.

func (Service) RotateBranchPassword added in v0.21.0

func (s Service) RotateBranchPassword(ctx context.Context, databaseName, branchName string) (*apiclient.DatabaseBranch, error)

RotateBranchPassword rotates the branch role's password, invalidating the previous connection string.

Jump to

Keyboard shortcuts

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