Documentation ¶
Index ¶
- Constants
- Variables
- func NewBackupFormat(source string) formatter.Format
- func NewFullBackupFormat(source string) formatter.Format
- func NewKeyspaceLocationFormat(source string) formatter.Format
- func Write(ctx formatter.Context, backups []ybaclient.BackupResp) error
- type Context
- func (c *Context) BackupType() string
- func (c *Context) BackupUUID() string
- func (c *Context) BaseBackupUUID() string
- func (c *Context) Category() string
- func (c *Context) CompletionTime() string
- func (c *Context) CreateTime() string
- func (c *Context) ExpiryTime() string
- func (c *Context) HasIncrementalBackups() string
- func (c *Context) KMSConfig() string
- func (c *Context) MarshalJSON() ([]byte, error)
- func (c *Context) ScheduleName() string
- func (c *Context) State() string
- func (c *Context) StorageConfiguration() string
- func (c *Context) StorageConfigurationType() string
- func (c *Context) Universe() string
- type FullBackupContext
- type KeyspaceLocationContext
- func (k *KeyspaceLocationContext) BackupSizeInBytes() int64
- func (k *KeyspaceLocationContext) DefaultLocation() string
- func (k *KeyspaceLocationContext) Keyspace() string
- func (k *KeyspaceLocationContext) MarshalJSON() ([]byte, error)
- func (k *KeyspaceLocationContext) SetKeyspaceLocation(keyspaceLocation ybaclient.KeyspaceTablesList)
- func (k *KeyspaceLocationContext) TableNameList() []string
- func (k *KeyspaceLocationContext) TableUUIDList() []string
- func (k *KeyspaceLocationContext) Write(index int) error
Constants ¶
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 ¶
var KMSConfigs []util.KMSConfig
KMSConfigs hold kms configs declared under the current customer
var StorageConfigs []ybaclient.CustomerConfigUI
StorageConfigs hold storage config for the backup
Functions ¶
func NewBackupFormat ¶
NewBackupFormat for formatting output
func NewFullBackupFormat ¶
NewFullBackupFormat for formatting output
func NewKeyspaceLocationFormat ¶
NewKeyspaceLocationFormat for formatting output
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) BaseBackupUUID ¶
BaseBackupUUID fetches Base Backup UUID
func (*Context) CompletionTime ¶
CompletionTime fetches Completion Time
func (*Context) HasIncrementalBackups ¶
HasIncrementalBackups fetches Has Incremental Backups
func (*Context) ScheduleName ¶
ScheduleName fetches Schedule Name
func (*Context) StorageConfiguration ¶
StorageConfiguration fetches Storage Config Name
func (*Context) StorageConfigurationType ¶
StorageConfigurationType fetches Storage Config Type
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