pullform

package
v1.23.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package pullform renders the modal "pull image" form shown in the images view when the pull command is invoked without a selected image.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

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

Model is the single-field (Image) pull-image form.

func New

func New() Model

New builds an empty form.

func (Model) Busy

func (m Model) Busy() bool

Busy reports whether a pull is currently in flight.

func (Model) Image

func (m Model) Image() string

Image returns the trimmed image reference.

func (*Model) Open

func (m *Model) Open()

Open prepares the form to pull a new image, clearing any previous input.

func (*Model) OpenPulling

func (m *Model) OpenPulling(ref string) tea.Cmd

OpenPulling opens the form already pulling the given reference: it pre-fills the image and enters the busy state without an input step, used when the reference is known up front (pull <image> or pulling the selected image). Returns the spinner-start command.

func (*Model) Pulling

func (m *Model) Pulling() tea.Cmd

Pulling marks the form busy while the pull runs: it clears any error, blurs the input and returns the command that starts the spinner animation. Render continues to show the image being pulled.

func (*Model) SetError

func (m *Model) SetError(s string)

SetError shows a validation/operation message inside the form (keeps it open) and clears the busy state so the user can correct the input and retry.

func (Model) Tick

func (m Model) Tick(msg spinner.TickMsg) (Model, tea.Cmd)

Tick advances the spinner; used while a pull is in flight.

func (Model) Update

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

Update forwards key events to the image field. While busy, input is ignored.

func (Model) View

func (m Model) View(width, height int) string

View renders the form centered within the given area.

Jump to

Keyboard shortcuts

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