ui

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertListCommandToListModel

func ConvertListCommandToListModel(title string, commands []*Command) list.Model

func InitialModel

func InitialModel() *modelInputText

func ScanCommands

func ScanCommands() (map[string][]*Command, error)

Types

type Command

type Command struct {
	Name string

	Args []arg
	// contains filtered or unexported fields
}

func NewCommand

func NewCommand(name string, description string, opts ...CommandOptional) *Command

func (Command) Description

func (c Command) Description() string

func (Command) FilterValue

func (c Command) FilterValue() string

func (Command) Title

func (c Command) Title() string

type CommandOptional

type CommandOptional func(command *Command)

func WithArgs

func WithArgs(args []arg) CommandOptional

type ModelLists

type ModelLists struct {
	Lists []list.Model

	CurrentCommand *Command
	// contains filtered or unexported fields
}

func (*ModelLists) Init

func (m *ModelLists) Init() tea.Cmd

func (*ModelLists) Update

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

func (*ModelLists) View

func (m *ModelLists) View() string

func (*ModelLists) ViewMenu

func (m *ModelLists) ViewMenu() string

Jump to

Keyboard shortcuts

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