tui

package
v0.0.0-...-b6cf1f4 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAborted = errors.New("operation cancelled")

ErrAborted indicates that the user left the interactive UI without selecting.

Functions

func BrowseSnapshots

func BrowseSnapshots(
	snapshots []storage.Snapshot,
	title string,
	showRepo bool,
	deleteHandler DeleteHandler,
) error

BrowseSnapshots launches an interactive view for the provided snapshots.

func SelectSnapshot

func SelectSnapshot(snapshots []storage.Snapshot, title string, showRepo bool) (*storage.Snapshot, error)

SelectSnapshot launches an interactive selector and returns the chosen snapshot.

Types

type DeleteHandler

type DeleteHandler func(*storage.Snapshot) error

DeleteHandler handles deleting a snapshot from persistent storage.

type SnapshotListMode

type SnapshotListMode int

SnapshotListMode controls how the interactive UI behaves.

const (
	// SnapshotListBrowse shows snapshots without returning a selection.
	SnapshotListBrowse SnapshotListMode = iota
	// SnapshotListSelect allows selecting a snapshot (used by restore).
	SnapshotListSelect
)

Jump to

Keyboard shortcuts

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