tui

package
v0.0.0-...-56270e8 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TabCloseCmd = func() tea.Msg {
	return TabCloseMsg("close")
}

Functions

func NodeInspectModel

func NodeInspectModel(name string, node *bao.Node, running bool) tabModel

func NodeStartModel

func NodeStartModel() tabModel

func NodesModel

func NodesModel() tabModel

func ProfileApplyModel

func ProfileApplyModel(name string) tabModel

func ProfilesModel

func ProfilesModel() tabModel

func TabModel

func TabModel() *tabs

func TabReplaceCmd

func TabReplaceCmd(oldTab tabModel, newTab tabModel) func() tea.Msg

Types

type Button

type Button struct {
	Text string
	Id   string

	Selected bool
	Disabled bool

	Action func() tea.Cmd
}

func NewButton

func NewButton(namespace string, text string, action func() tea.Cmd) *Button

func (*Button) Blur

func (m *Button) Blur()

func (*Button) Focus

func (m *Button) Focus() tea.Cmd

func (*Button) Focused

func (m *Button) Focused() bool

func (*Button) Init

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

func (*Button) Update

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

func (*Button) View

func (m *Button) View() string

type Checkbox

type Checkbox struct {
	Title string
	Desc  string
	Id    string

	Value bool

	Selected bool
	Disabled bool

	Action func() tea.Cmd
}

func NewCheckbox

func NewCheckbox(namespace string, title string, desc string) *Checkbox

func (*Checkbox) Blur

func (m *Checkbox) Blur()

func (*Checkbox) Focus

func (m *Checkbox) Focus() tea.Cmd

func (*Checkbox) Focused

func (m *Checkbox) Focused() bool

func (*Checkbox) Init

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

func (*Checkbox) Update

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

func (*Checkbox) View

func (m *Checkbox) View() string

type Focusable

type Focusable interface {
	Focus() tea.Cmd
	Blur()
	Focused() bool
}

type Radio

type Radio struct {
	Title string
	Desc  string
	Id    string

	Options []string
	Value   int

	Selected bool
	Disabled bool

	Action func() tea.Cmd
}

func NewRadio

func NewRadio(namespace string, title string, desc string, opts []string) *Radio

func (*Radio) Blur

func (m *Radio) Blur()

func (*Radio) Focus

func (m *Radio) Focus() tea.Cmd

func (*Radio) Focused

func (m *Radio) Focused() bool

func (*Radio) GetValue

func (m *Radio) GetValue() string

func (*Radio) Init

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

func (*Radio) Update

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

func (*Radio) View

func (m *Radio) View() string

type TabCloseMsg

type TabCloseMsg string

type TabFocusMsg

type TabFocusMsg string

type TabReplaceMsg

type TabReplaceMsg struct {
	OldTab tabModel
	NewTab tabModel
}

Jump to

Keyboard shortcuts

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