tui

package
v0.0.0-...-95b795d Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileView

func NewFileView(ss store.Client, pageSize int, fn store.CursorFunc) *fileView

Types

type SearchKind

type SearchKind string
const (
	All  SearchKind = "*"
	Name SearchKind = "name"
	Tag  SearchKind = "tag"
)

type State

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

State manages a stack of views and provides common utility like a back button When all views are popped the program ends

func NewState

func NewState(ctx context.Context, cfg *config.AppConfig, db *sqlx.DB) *State

func (*State) Init

func (s *State) Init() tea.Cmd

func (*State) PopView

func (s *State) PopView()

func (*State) PushView

func (s *State) PushView(v View)

func (*State) Top

func (s *State) Top() View

func (*State) Update

func (s *State) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*State) View

func (s *State) View() string

type View

type View interface {
	Enter(context.Context)
	Exit(context.Context)
	View() []string
	Update(context.Context, tea.Msg, *State) (View, tea.Cmd)
}

func NewManageView

func NewManageView(file *data.File, store store.Client) View

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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