account

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(cfg *config.ConfigCms, dbpool db.DB, publicKey string) func() (CreateModel, 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 CreateModel) string

View renders current view from the model.

Types

type CreateAccountMsg

type CreateAccountMsg *db.User

type CreateModel

type CreateModel 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 NewCreateModel

func NewCreateModel(cfg *config.ConfigCms, dbpool db.DB, publicKey string) CreateModel

NewModel returns a new username model in its initial state.

func Update

func Update(msg tea.Msg, m CreateModel) (CreateModel, 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 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