username

package
v0.12.6 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(cc *client.Client) func() (Model, tea.Cmd)

Init is the Bubble Tea initialization function.

func InitialCmd

func InitialCmd() tea.Cmd

InitialCmd returns the initial command.

func View

func View(m Model) string

View renders current view from the model.

Types

type Model

type Model struct {
	Done bool // true when it's time to exit this view
	Quit bool // true when the user wants to quit the whole program
	// contains filtered or unexported fields
}

Model holds the state of the username UI.

func NewModel

func NewModel(cc *client.Client) Model

NewModel returns a new username model in its initial state.

func Update

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

Update is the Bubble Tea update loop.

type NameInvalidMsg

type NameInvalidMsg struct{}

NameInvalidMsg is sent when the requested username has failed validation.

type NameSetMsg

type NameSetMsg string

NameSetMsg is sent when a new name has been set successfully. It contains the new name.

type NameTakenMsg

type NameTakenMsg struct{}

NameTakenMsg is sent when the requested username has already been taken.

Jump to

Keyboard shortcuts

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