Documentation
¶
Index ¶
- Constants
- type BackupDetailView
- type BackupVolumesLoadedMsg
- type DetailView
- type ExecuteBackupActionMsg
- type ExecuteSnapshotActionMsg
- type ExecuteVolumeActionMsg
- type LoadBackupRestoreVolumesMsg
- type ShowVolumeDetailMsg
- type SnapshotDetailView
- type TableView
- func (v *TableView) GetSelectedVolume() map[string]interface{}
- func (v *TableView) HandleKey(msg tea.KeyMsg) tea.Cmd
- func (v *TableView) HelpText() string
- func (v *TableView) Render(width, height int) string
- func (v *TableView) Title() string
- func (v *TableView) UpdateData(data []map[string]interface{})
Constants ¶
const ( BackupActionDelete = iota BackupActionRestore // restore onto existing volume BackupActionCreateVolume // create new volume then restore )
const ( VolumeActionDelete = iota VolumeActionRename VolumeActionExtend )
Action indices for volume detail view
const ( SnapshotActionDelete = iota SnapshotActionCreateVolume )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupDetailView ¶
BackupDetailView displays a volume backup with Delete, Restore and Create Volume actions.
func NewBackupDetailView ¶
func NewBackupDetailView(ctx *views.Context, backup map[string]interface{}) *BackupDetailView
func (*BackupDetailView) HelpText ¶
func (v *BackupDetailView) HelpText() string
func (*BackupDetailView) Render ¶
func (v *BackupDetailView) Render(width, height int) string
func (*BackupDetailView) SetRestoreVolumes ¶
func (v *BackupDetailView) SetRestoreVolumes(volumes []map[string]interface{})
SetRestoreVolumes is called by the manager after volumes are loaded.
func (*BackupDetailView) Title ¶
func (v *BackupDetailView) Title() string
type BackupVolumesLoadedMsg ¶
type BackupVolumesLoadedMsg struct {
Volumes []map[string]interface{}
}
BackupVolumesLoadedMsg is sent by the manager after loading volumes for restore picker.
type DetailView ¶
DetailView displays block storage volume details with actions.
func NewDetailView ¶
func NewDetailView(ctx *views.Context, volume map[string]interface{}) *DetailView
func (*DetailView) HelpText ¶
func (v *DetailView) HelpText() string
func (*DetailView) Render ¶
func (v *DetailView) Render(width, height int) string
func (*DetailView) Title ¶
func (v *DetailView) Title() string
type ExecuteBackupActionMsg ¶
type ExecuteBackupActionMsg struct {
Backup map[string]interface{}
Action int
VolumeID string // for Restore action
VolumeName string // for CreateVolume action
VolumeSize string // for CreateVolume action
}
ExecuteBackupActionMsg is dispatched when a backup action is confirmed.
type ExecuteSnapshotActionMsg ¶
type ExecuteSnapshotActionMsg struct {
Snapshot map[string]interface{}
Action int
VolumeName string
VolumeSize string // GB as string
}
ExecuteSnapshotActionMsg is dispatched when snapshot action is confirmed.
type ExecuteVolumeActionMsg ¶
type LoadBackupRestoreVolumesMsg ¶
type LoadBackupRestoreVolumesMsg struct {
Backup map[string]interface{}
}
LoadBackupRestoreVolumesMsg asks the manager to fetch volumes for the restore picker.
type ShowVolumeDetailMsg ¶
type ShowVolumeDetailMsg struct {
Volume map[string]interface{}
}
type SnapshotDetailView ¶
SnapshotDetailView displays a volume snapshot with Delete and Create Volume actions.
func NewSnapshotDetailView ¶
func NewSnapshotDetailView(ctx *views.Context, snapshot map[string]interface{}) *SnapshotDetailView
func (*SnapshotDetailView) HandleKey ¶
func (v *SnapshotDetailView) HandleKey(msg tea.KeyMsg) tea.Cmd
func (*SnapshotDetailView) HelpText ¶
func (v *SnapshotDetailView) HelpText() string
func (*SnapshotDetailView) Render ¶
func (v *SnapshotDetailView) Render(width, height int) string
func (*SnapshotDetailView) Title ¶
func (v *SnapshotDetailView) Title() string
type TableView ¶
func (*TableView) GetSelectedVolume ¶
func (*TableView) UpdateData ¶
UpdateData updates the table with new data.