misc

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionTable

type ActionTable struct {
	*viz.Table
}

ActionTable is a wrapper widget around a Table meant to display error messages if any

func NewActionTable

func NewActionTable() *ActionTable

NewActionTable is a constructor for the ActionTable type

func (*ActionTable) Draw

func (actionTable *ActionTable) Draw(buf *ui.Buffer)

Draw puts the required text into the widget

func (*ActionTable) SelectedAction

func (actionTable *ActionTable) SelectedAction() string

SelectedAction returns an action as string from the selected row of the action table

type ErrorBox

type ErrorBox struct {
	*vz.Table
	// contains filtered or unexported fields
}

ErrorBox is a wrapper widget around a List meant to display error messages if any. It implements the ui.Drawable interface.

func NewErrorBox

func NewErrorBox() *ErrorBox

NewErrorBox is a constructor for the ErrorBox type.

func (*ErrorBox) Draw

func (errBox *ErrorBox) Draw(buf *ui.Buffer)

Draw puts the required text into the widget.

func (*ErrorBox) Resize

func (errBox *ErrorBox) Resize(termWidth, termHeight int)

Resize resizes the widget based on specified width and height.

func (*ErrorBox) SetErrorString

func (errBox *ErrorBox) SetErrorString(errStr string, err error)

SetErrorString sets the error string to be displayed.

type HelpKeybindingType

type HelpKeybindingType int

HelpKeybindingType is the type of the keybinding that a help page will use for a specific command.

const (
	// RootCommand is the keybinding identifier
	// for the "main" command of grofer, i.e. `grofer`.
	RootCommand HelpKeybindingType = iota
	// ProcCommand is the keybinding identifier
	// for the `grofer proc` command.
	ProcCommand
	// PerProcCommand is the keybinding identifier
	// for the `grofer proc -p <pid>` command.
	PerProcCommand
	// ContainerCommand is the keybinding identifier
	// for the `grofer container` command.
	ContainerCommand
	// PerContainerCommand is the keybinding identifier
	// for the `grofer container -c <CID>` command.
	PerContainerCommand
)

type HelpMenu

type HelpMenu struct {
	*vz.Table
	// contains filtered or unexported fields
}

HelpMenu is a wrapper widget around a List meant to display the help menu for a command. HelpMenu implements the ui.Drawable interface.

func NewHelpMenu

func NewHelpMenu() *HelpMenu

NewHelpMenu is a constructor for the HelpMenu type.

func (*HelpMenu) Draw

func (help *HelpMenu) Draw(buf *ui.Buffer)

Draw puts the required text into the widget.

func (*HelpMenu) ForCommand

func (help *HelpMenu) ForCommand(command HelpKeybindingType) *HelpMenu

ForCommand sets the keybindings to be displayed as part of the help for a specific command and returns the modified HelpMenu.

func (*HelpMenu) Resize

func (help *HelpMenu) Resize(termWidth, termHeight int)

Resize resizes the widget based on specified width and height

type SignalTable

type SignalTable struct {
	*viz.Table
}

SignalTable is a wrapper widget around a Table meant to display error messages if any

func NewSignalTable

func NewSignalTable() *SignalTable

NewSignalTable is a constructor for the SignalTable type

func (*SignalTable) Draw

func (sigTable *SignalTable) Draw(buf *ui.Buffer)

Draw puts the required text into the widget

func (*SignalTable) SelectedSignal

func (sigTable *SignalTable) SelectedSignal() syscall.Signal

SelectedSignal returns the signal at the currently selected row index

func (*SignalTable) SignalFromRow

func (sigTable *SignalTable) SignalFromRow(rowIndex int) syscall.Signal

SignalFromRow returns the symbol at a given row index

Jump to

Keyboard shortcuts

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