page

package
v0.54.20 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScaffoldButtonName      = "Scaffold"
	ViewInBrowserButtonName = "View Source in Browser"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Button

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

func NewButton

func NewButton(name string, action ButtonActionFunc) *Button

func (*Button) Action

func (btn *Button) Action(msg tea.Msg) tea.Cmd

type ButtonActionFunc

type ButtonActionFunc func(msg tea.Msg) tea.Cmd

type Buttons

type Buttons []*Button

func NewButtons

func NewButtons(btns ...*Button) Buttons

func (Buttons) Focus

func (btns Buttons) Focus(index ...int) Buttons

func (Buttons) Get

func (btns Buttons) Get(index ...int) *Button

func (Buttons) GetByName

func (btns Buttons) GetByName(name string) *Button

func (Buttons) Len

func (btns Buttons) Len() int

func (Buttons) View

func (btns Buttons) View() string

type KeyMap

type KeyMap struct {
	viewport.KeyMap

	// Button navigation
	Navigation key.Binding

	// Select button
	Choose key.Binding

	// Run Scaffold command
	Scaffold key.Binding

	// Help toggle keybindings.
	Help key.Binding

	// The quit keybinding. This won't be caught when filtering.
	Quit key.Binding

	// The quit-no-matter-what keybinding. This will be caught when filtering.
	ForceQuit key.Binding
	// contains filtered or unexported fields
}

KeyMap defines a set of keybindings. To work for help it must satisfy key.Map. It could also very easily be a map[string]key.Binding.

func (KeyMap) FullHelp

func (keys KeyMap) FullHelp() [][]key.Binding

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

func (KeyMap) ShortHelp

func (keys KeyMap) ShortHelp() []key.Binding

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

func (*KeyMap) Update

func (keys *KeyMap) Update(msg tea.Msg) tea.Cmd

func (*KeyMap) View

func (keys *KeyMap) View() string

type Model

type Model struct {
	Buttons Buttons
	// contains filtered or unexported fields
}

func NewModel

func NewModel(module *module.Module, width, height int, previousModel tea.Model, quitFn func(error), opts *options.TerragruntOptions) (*Model, error)

func (Model) Init

func (model Model) Init() tea.Cmd

Init implements bubbletea.Model.Init

func (Model) Update

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

Update implements bubbletea.Model.Update

func (Model) View

func (model Model) View() string

View implements bubbletea.Model.View

Jump to

Keyboard shortcuts

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