Help us shape the future of Go! Take the 2026 Go Developer Survey

backupslist

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() tea.Model

New builds the version list. It starts empty and loading; the page switch issues GetBackups, whose result fills it via BackupListMsg.

It starts focused because the page opens on the list: it is the panel with the cursor, and the preview has nothing to scroll until that cursor picks a row.

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is the Backups page's left panel: a merged, newest-first list of stored versions of the compose file and the .env.

It owns the cursor and nothing else. The bytes behind the selected row belong to backuppreviewpanel, which learns about the selection through cmds.SetSelectedBackupMsg rather than by being handed a pointer - the two panels are siblings under AppModel, the same as Home's list and details.

The rows live in a bubbles list, the same as the groups and services lists, which is where the cursor, the pagination and the filter come from. This panel hand-rolled all three until it was brought in line; see docs/plans/backups-rework.md.

func (Model) FilterState

func (m Model) FilterState() list.FilterState

FilterState exposes how much of the keyboard the list has taken, so AppModel can snapshot it into the help overlay's context.

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) KeepsEsc

func (m Model) KeepsEsc() bool

KeepsEsc reports whether the list needs esc for itself. Same rule as the groups list - see groupslist.Model.KeepsEsc. It is the only thing esc does on this page: there is no selection to clear here, so with no filter standing the key is inert and the footer does not offer it.

func (Model) ListEmpty

func (m Model) ListEmpty() bool

ListEmpty reports whether there are any stored versions at all, so the footer and the help overlay can drop the filter key on an empty store. AppModel derives Home's and Services' emptiness from the loaded config; the backup store is only known here, so this panel has to answer for itself.

func (Model) OwnsKeyboard

func (m Model) OwnsKeyboard() bool

OwnsKeyboard reports whether the list is taking every keystroke for itself, which it does while a filter is being typed. Same rule as the groups list - see groupslist.Model.OwnsKeyboard.

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() tea.View

Jump to

Keyboard shortcuts

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