view

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Width  int
	Height int
}

type Index

type Index interface {
	InitModel(Config) (tea.Model, tea.Cmd)
	PrevModel(Config) (tea.Model, tea.Cmd)
	NextModel(Config) (tea.Model, tea.Cmd)
}

type IndexModel

type IndexModel struct {
	Width  int
	Height int

	Models     []Model
	ModelIndex int
}

func (*IndexModel) InitModel

func (m *IndexModel) InitModel(cfg Config) (tea.Model, tea.Cmd)

func (*IndexModel) NextModel

func (m *IndexModel) NextModel(cfg Config) (tea.Model, tea.Cmd)

func (*IndexModel) PrevModel

func (m *IndexModel) PrevModel(cfg Config) (tea.Model, tea.Cmd)

func (*IndexModel) SetModels

func (m *IndexModel) SetModels() tea.Model

type LoginModel

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

func NewLoginModel

func NewLoginModel() *LoginModel

func (LoginModel) Init

func (m LoginModel) Init() tea.Cmd

func (*LoginModel) Initialize

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

func (*LoginModel) SetIndex

func (m *LoginModel) SetIndex(index Index)

func (LoginModel) Update

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

func (LoginModel) View

func (m LoginModel) View() string

type Model

type Model interface {
	tea.Model
	SetIndex(Index)
	Initialize(Config) tea.Cmd
}

type ModelGen

type ModelGen struct {
	Term   string
	Width  int
	Height int
	Time   time.Time
	// contains filtered or unexported fields
}

Just a generic tea.ModelGen to demo terminal information of ssh.

func (ModelGen) Init

func (m ModelGen) Init() tea.Cmd

func (ModelGen) Update

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

func (ModelGen) View

func (m ModelGen) View() string

type SplitModel

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

func NewModelSplit

func NewModelSplit() *SplitModel

func (SplitModel) Init

func (m SplitModel) Init() tea.Cmd

func (*SplitModel) Initialize

func (m *SplitModel) Initialize(cfg Config) tea.Cmd

func (*SplitModel) SetIndex

func (m *SplitModel) SetIndex(index Index)

func (SplitModel) Update

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

func (SplitModel) View

func (m SplitModel) View() string

type TimeMsg

type TimeMsg time.Time

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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