block_storage

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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]any) *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]any)

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]any
}

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]any) *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]any
	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]any
	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]any
	Action int
	Param  string
}

type LoadBackupRestoreVolumesMsg

type LoadBackupRestoreVolumesMsg struct {
	Backup map[string]any
}

LoadBackupRestoreVolumesMsg asks the manager to fetch volumes for the restore picker.

type ShowVolumeDetailMsg

type ShowVolumeDetailMsg struct {
	Volume map[string]any
}

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]any) *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]any) *TableView

func (*TableView) GetSelectedVolume

func (v *TableView) GetSelectedVolume() map[string]any

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]any)

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