pushform

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: 5 Imported by: 0

Documentation

Overview

Package pushform renders the modal registry-credentials form shown before pushing an image to a private registry.

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 three-field (Registry, Username, Password) modal form. An empty username submits an anonymous push.

func New

func New() Model

New builds an empty form with a masked password field.

func (*Model) Next

func (m *Model) Next()

Next moves focus to the following field.

func (*Model) Open

func (m *Model) Open(ref, registry, username, password string)

Open prepares the form to push ref, pre-filled with the inferred registry and any remembered credentials for that registry.

func (Model) Password

func (m Model) Password() string

Password returns the password field verbatim (not trimmed — tokens may have significant characters, though leading/trailing spaces are unusual).

func (*Model) Prev

func (m *Model) Prev()

Prev moves focus to the previous field.

func (Model) Ref

func (m Model) Ref() string

Ref returns the image reference being pushed.

func (Model) Registry

func (m Model) Registry() string

Registry returns the trimmed registry field.

func (*Model) SetError

func (m *Model) SetError(s string)

SetError shows a validation/operation message inside the form (keeps it open).

func (Model) Update

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

Update forwards key events to the focused field.

func (Model) Username

func (m Model) Username() string

Username returns the trimmed username field.

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