backup

package
v0.0.0-...-cb0dfba Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// BackupUUIDHeader to display backup UUID
	BackupUUIDHeader = "Backup UUID"

	// UniverseHeader to display universe UUID and Name
	UniverseHeader = "Universe"
	// StorageConfigHeader to display storage config
	StorageConfigHeader = "Storage Configuration"

	// BackupTypeHeader to display backup type
	BackupTypeHeader = "Backup Type"

	// StateHeader to display state
	StateHeader = "State"

	// CompletionTimeHeader to display completion time
	CompletionTimeHeader = "Completion Time"
)

Variables

View Source
var KMSConfigs []util.KMSConfig

KMSConfigs hold kms configs declared under the current customer

View Source
var StorageConfigs []ybaclient.CustomerConfigUI

StorageConfigs hold storage config for the backup

Functions

func NewBackupFormat

func NewBackupFormat(source string) formatter.Format

NewBackupFormat for formatting output

func NewFullBackupFormat

func NewFullBackupFormat(source string) formatter.Format

NewFullBackupFormat for formatting output

func NewKeyspaceLocationFormat

func NewKeyspaceLocationFormat(source string) formatter.Format

NewKeyspaceLocationFormat for formatting output

func Write

func Write(ctx formatter.Context, backups []ybaclient.BackupResp) error

Write renders the context for a list of backups

Types

type Context

type Context struct {
	formatter.HeaderContext
	formatter.Context
	// contains filtered or unexported fields
}

Context for BackupResp outputs

func NewBackupContext

func NewBackupContext() *Context

NewBackupContext creates a new context for rendering backups

func (*Context) BackupType

func (c *Context) BackupType() string

BackupType fetches Backup Type

func (*Context) BackupUUID

func (c *Context) BackupUUID() string

BackupUUID fetches Backup UUID

func (*Context) BaseBackupUUID

func (c *Context) BaseBackupUUID() string

BaseBackupUUID fetches Base Backup UUID

func (*Context) Category

func (c *Context) Category() string

Category fetches Category

func (*Context) CompletionTime

func (c *Context) CompletionTime() string

CompletionTime fetches Completion Time

func (*Context) CreateTime

func (c *Context) CreateTime() string

CreateTime fetches Create Time

func (*Context) ExpiryTime

func (c *Context) ExpiryTime() string

ExpiryTime fetches Expiry Time

func (*Context) HasIncrementalBackups

func (c *Context) HasIncrementalBackups() string

HasIncrementalBackups fetches Has Incremental Backups

func (*Context) KMSConfig

func (c *Context) KMSConfig() string

KMSConfig fetches KMS Config

func (*Context) MarshalJSON

func (c *Context) MarshalJSON() ([]byte, error)

MarshalJSON function

func (*Context) ScheduleName

func (c *Context) ScheduleName() string

ScheduleName fetches Schedule Name

func (*Context) State

func (c *Context) State() string

State fetches State

func (*Context) StorageConfiguration

func (c *Context) StorageConfiguration() string

StorageConfiguration fetches Storage Config Name

func (*Context) StorageConfigurationType

func (c *Context) StorageConfigurationType() string

StorageConfigurationType fetches Storage Config Type

func (*Context) Universe

func (c *Context) Universe() string

Universe fetches Universe UUID and name

type FullBackupContext

type FullBackupContext struct {
	formatter.HeaderContext
	formatter.Context
	// contains filtered or unexported fields
}

FullBackupContext to render backup Details output

func NewFullBackupContext

func NewFullBackupContext() *FullBackupContext

NewFullBackupContext creates a new context for rendering backup

func (*FullBackupContext) MarshalJSON

func (fb *FullBackupContext) MarshalJSON() ([]byte, error)

MarshalJSON function

func (*FullBackupContext) SetFullBackup

func (fb *FullBackupContext) SetFullBackup(backup ybaclient.BackupResp)

SetFullBackup initializes the context with the backup data

func (*FullBackupContext) Write

func (fb *FullBackupContext) Write() error

Write populates the output table to be displayed in the command line

type KeyspaceLocationContext

type KeyspaceLocationContext struct {
	formatter.HeaderContext
	formatter.Context
	// contains filtered or unexported fields
}

KeyspaceLocationContext for keyspace location outputs

func NewKeyspaceLocationContext

func NewKeyspaceLocationContext() *KeyspaceLocationContext

NewKeyspaceLocationContext creates a new context for rendering keyspace location

func (*KeyspaceLocationContext) BackupSizeInBytes

func (k *KeyspaceLocationContext) BackupSizeInBytes() int64

BackupSizeInBytes fetches Backup Size in Bytes

func (*KeyspaceLocationContext) DefaultLocation

func (k *KeyspaceLocationContext) DefaultLocation() string

DefaultLocation fetches Default Location

func (*KeyspaceLocationContext) Keyspace

func (k *KeyspaceLocationContext) Keyspace() string

Keyspace fetches Keyspace

func (*KeyspaceLocationContext) MarshalJSON

func (k *KeyspaceLocationContext) MarshalJSON() ([]byte, error)

MarshalJSON function

func (*KeyspaceLocationContext) SetKeyspaceLocation

func (k *KeyspaceLocationContext) SetKeyspaceLocation(keyspaceLocation ybaclient.KeyspaceTablesList)

SetKeyspaceLocation initializes the context with the keyspace location data

func (*KeyspaceLocationContext) TableNameList

func (k *KeyspaceLocationContext) TableNameList() []string

TableNameList fetches Table Name List

func (*KeyspaceLocationContext) TableUUIDList

func (k *KeyspaceLocationContext) TableUUIDList() []string

TableUUIDList fetches Table UUID List

func (*KeyspaceLocationContext) Write

func (k *KeyspaceLocationContext) Write(index int) error

Write populates the output table to be displayed in the command line

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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