block_storage

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BackupActionDelete       = iota
	BackupActionRestore      // restore onto existing volume
	BackupActionCreateVolume // create new volume then restore
)
View Source
const (
	VolumeActionDelete = iota
	VolumeActionRename
	VolumeActionExtend
)

Action indices for volume detail view

View Source
const (
	SnapshotActionDelete = iota
	SnapshotActionCreateVolume
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupDetailView

type BackupDetailView struct {
	views.BaseView
	// contains filtered or unexported fields
}

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) HandleKey

func (v *BackupDetailView) HandleKey(msg tea.KeyMsg) tea.Cmd

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

type DetailView struct {
	views.BaseView
	// contains filtered or unexported fields
}

DetailView displays block storage volume details with actions.

func NewDetailView

func NewDetailView(ctx *views.Context, volume map[string]interface{}) *DetailView

func (*DetailView) HandleKey

func (v *DetailView) HandleKey(msg tea.KeyMsg) tea.Cmd

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 ExecuteVolumeActionMsg struct {
	Volume map[string]interface{}
	Action int
	Param  string
}

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

type SnapshotDetailView struct {
	views.BaseView
	// contains filtered or unexported fields
}

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

type TableView struct {
	views.BaseView
	// contains filtered or unexported fields
}

func NewTableView

func NewTableView(ctx *views.Context, data []map[string]interface{}) *TableView

func (*TableView) GetSelectedVolume

func (v *TableView) GetSelectedVolume() map[string]interface{}

func (*TableView) HandleKey

func (v *TableView) HandleKey(msg tea.KeyMsg) tea.Cmd

func (*TableView) HelpText

func (v *TableView) HelpText() string

func (*TableView) Render

func (v *TableView) Render(width, height int) string

func (*TableView) Title

func (v *TableView) Title() string

func (*TableView) UpdateData

func (v *TableView) UpdateData(data []map[string]interface{})

UpdateData updates the table with new data.

Jump to

Keyboard shortcuts

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