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

login

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginFailedMsg

type LoginFailedMsg struct {
	Err error
}

LoginFailedMsg is sent when authentication fails.

type LoginSuccessMsg

type LoginSuccessMsg struct {
	Token     string
	ServerURL string
	Username  string
}

LoginSuccessMsg is sent when authentication succeeds.

type Model

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

Model is the bubbletea model for the login screen.

func New

func New(styles ui.Styles) Model

New creates a new login screen model.

func (Model) Error

func (m Model) Error() error

Error returns the last login error, if any.

func (Model) Focused

func (m Model) Focused() int

Focused returns the index of the currently focused field.

func (Model) Init

func (m Model) Init() tea.Cmd

Init returns the initial command (start blinking cursor).

func (Model) Loading

func (m Model) Loading() bool

Loading returns whether a login is in progress.

func (Model) Password

func (m Model) Password() string

Password returns the current password input value.

func (Model) ServerURL

func (m Model) ServerURL() string

ServerURL returns the current server URL input value.

func (*Model) SetSize

func (m *Model) SetSize(width, height int)

SetSize updates the terminal dimensions.

func (Model) Update

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

Update handles messages for the login screen.

func (Model) Username

func (m Model) Username() string

Username returns the current username input value.

func (Model) View

func (m Model) View() string

View renders the login screen.

Jump to

Keyboard shortcuts

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