database

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: Apache-2.0 Imports: 7 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) CreateBackup added in v0.23.0

func (s Service) CreateBackup(ctx context.Context, databaseName, backupName string) (*apiclient.DatabaseBackup, error)

CreateBackup captures a database as it is now.

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) DeleteBackup added in v0.23.0

func (s Service) DeleteBackup(ctx context.Context, databaseName, backupName string) error

DeleteBackup deletes one backup of a database in the current project.

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) GetBackup added in v0.23.0

func (s Service) GetBackup(ctx context.Context, databaseName, backupName string) (*apiclient.DatabaseBackup, error)

GetBackup returns one backup of a database in the current project.

func (Service) GetBackupSchedule added in v0.23.0

func (s Service) GetBackupSchedule(ctx context.Context, databaseName string) (*apiclient.DatabaseBackupSchedule, error)

GetBackupSchedule returns a database's automated backup schedule.

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) GetRestore added in v0.23.0

func (s Service) GetRestore(ctx context.Context, databaseName string, restoreID uuid.UUID) (*apiclient.DatabaseRestore, error)

GetRestore returns one restore of a database in the current project.

func (Service) ListBackups added in v0.23.0

func (s Service) ListBackups(ctx context.Context, databaseName string) (*apiclient.DatabaseBackupList, error)

ListBackups returns a database's backups and its point-in-time restore window.

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) ListRestores added in v0.23.0

func (s Service) ListRestores(ctx context.Context, databaseName string) (*apiclient.DatabaseRestoreList, error)

ListRestores returns a database's restore history, newest first.

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) RestoreFromBackup added in v0.23.0

func (s Service) RestoreFromBackup(ctx context.Context, databaseName, backupName string) (*apiclient.DatabaseRestore, error)

RestoreFromBackup replaces a database's data with a named backup.

func (Service) RestoreToPointInTime added in v0.23.0

func (s Service) RestoreToPointInTime(ctx context.Context, databaseName string, restoreTo time.Time) (*apiclient.DatabaseRestore, error)

RestoreToPointInTime replaces a database's data with its state at restoreTo.

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.

func (Service) SetBackupSchedule added in v0.23.0

func (s Service) SetBackupSchedule(ctx context.Context, databaseName string, entries []apiclient.DatabaseBackupScheduleEntry) (*apiclient.DatabaseBackupSchedule, error)

SetBackupSchedule replaces a database's automated backup schedule. An empty entries slice stops scheduled backups.

Jump to

Keyboard shortcuts

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