tui

package
v0.0.0-...-9d10f22 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type AboutView

type AboutView struct{}

func (AboutView) Update

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

func (AboutView) View

func (v AboutView) View(m Model) string

type Model

type Model struct {
	UI ModelUI
}

func NewModel

func NewModel() Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

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

func (Model) View

func (m Model) View() string

type ModelUI

type ModelUI struct {
	View       ViewName
	TermWidth  int
	TermHeight int
	Keys       appKeyMap
	Help       help.Model
}

type ReposView

type ReposView struct{}

func (ReposView) Update

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

func (ReposView) View

func (v ReposView) View(m Model) string

type SettingsView

type SettingsView struct{}

func (SettingsView) Update

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

func (SettingsView) View

func (v SettingsView) View(m Model) string

type View

type View interface {
	Update(m Model, msg tea.Msg) (tea.Model, tea.Cmd)
	View(m Model) string
}

type ViewName

type ViewName string
const (
	Repos    ViewName = "repos"
	About    ViewName = "about"
	Settings ViewName = "settings"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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