models

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultDashboardKeys = DashboardKeyMap{
	Help: key.NewBinding(
		key.WithKeys("ctrl+h"),
		key.WithHelp("ctrl+h", "toggle help"),
	),
	Quit: key.NewBinding(
		key.WithKeys("q", "ctrl+c"),
		key.WithHelp("q, ctrl+c", "quit"),
	),
}
View Source
var DefaultTabberKeys = TabberKeyMap{
	TabRight: key.NewBinding(
		key.WithKeys("tab"),
		key.WithHelp("tab", "change tabs to the right"),
	),
	TabLeft: key.NewBinding(
		key.WithKeys("shift+tab"),
		key.WithHelp("shift+tab", "change tabs to the left"),
	),
}

Functions

This section is empty.

Types

type CompositeHelpKeyMap added in v0.3.0

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

func NewCompositeHelpKeyMap added in v0.3.0

func NewCompositeHelpKeyMap(helps ...help.KeyMap) *CompositeHelpKeyMap

func (CompositeHelpKeyMap) FullHelp added in v0.3.0

func (ch CompositeHelpKeyMap) FullHelp() [][]key.Binding

FullHelp returns keybindings for the expanded help view. It's part of the key.Map interface.

func (CompositeHelpKeyMap) ShortHelp added in v0.3.0

func (ch CompositeHelpKeyMap) ShortHelp() []key.Binding

ShortHelp returns keybindings to be shown in the mini help view. It's part of the key.Map interface.

type Dashboard

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

Dashboard is a tea.Model implementation for viewing Kubernetes information based on a declarative dashboard description

func NewDashboard

func NewDashboard(keys DashboardKeyMap, theme styles.Theme, panels ...tea.Model) *Dashboard

func (*Dashboard) Help added in v0.3.0

func (d *Dashboard) Help() help.KeyMap

func (*Dashboard) Init

func (d *Dashboard) Init() tea.Cmd

func (*Dashboard) Update

func (d *Dashboard) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Dashboard) View

func (d *Dashboard) View() string

type DashboardKeyMap

type DashboardKeyMap struct {
	Help key.Binding
	Quit key.Binding
}

func (DashboardKeyMap) FullHelp

func (k DashboardKeyMap) FullHelp() [][]key.Binding

FullHelp returns keybindings for the expanded help view. It's part of the key.Map interface.

func (DashboardKeyMap) ShortHelp

func (k DashboardKeyMap) ShortHelp() []key.Binding

ShortHelp returns keybindings to be shown in the mini help view. It's part of the key.Map interface.

type Helper added in v0.3.0

type Helper interface {
	Help() help.KeyMap
}

type Namer

type Namer interface {
	Name() string
}

type Tab added in v0.2.0

type Tab struct {
	Name  string
	Model tea.Model
}

type Tabber added in v0.2.0

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

func NewTabber added in v0.2.0

func NewTabber(keyMap TabberKeyMap, theme styles.Theme, tabs ...Tab) *Tabber

func (*Tabber) Help added in v0.3.0

func (t *Tabber) Help() help.KeyMap

func (*Tabber) Init added in v0.2.0

func (t *Tabber) Init() tea.Cmd

func (*Tabber) Update added in v0.2.0

func (t *Tabber) Update(msg tea.Msg) (*Tabber, tea.Cmd)

func (*Tabber) View added in v0.2.0

func (t *Tabber) View() string

type TabberKeyMap added in v0.2.0

type TabberKeyMap struct {
	TabRight key.Binding
	TabLeft  key.Binding
}

func (TabberKeyMap) FullHelp added in v0.3.0

func (k TabberKeyMap) FullHelp() [][]key.Binding

FullHelp returns keybindings for the expanded help view. It's part of the key.Map interface.

func (TabberKeyMap) ShortHelp added in v0.3.0

func (k TabberKeyMap) ShortHelp() []key.Binding

ShortHelp returns keybindings to be shown in the mini help view. It's part of the key.Map interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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