login

package
v0.0.0-...-536b113 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrLogin = errors.New("login failed")
View Source
var ErrNoSelection = errors.New("no selection")

Functions

This section is empty.

Types

type Action

type Action struct {
	Banner   string `cfg:"banner"`
	Tabs     []Auth `cfg:"tabs"`
	Selected string `cfg:"selected"`
}

func (Action) GetTabNames

func (a Action) GetTabNames() []string

func (Action) Login

func (a Action) Login(selected string, username, password string) error

func (*Action) TabSelected

func (a *Action) TabSelected() string

type Auth

type Auth struct {
	Name string `cfg:"name"`

	BasicAuth *auth.BasicAuth `cfg:"basic_auth"`
}

func (Auth) Login

func (a Auth) Login(username, password string) error

type LoginModel

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

func NewLoginModel

func NewLoginModel(action Action) *LoginModel

func (LoginModel) Init

func (m LoginModel) Init() tea.Cmd

func (*LoginModel) Initialize

func (m *LoginModel) Initialize(cfg model.Config) tea.Cmd

func (*LoginModel) SetIndex

func (m *LoginModel) SetIndex(index model.Index)

func (LoginModel) Update

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

func (LoginModel) View

func (m LoginModel) View() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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