Documentation ¶
Index ¶
- Constants
- Variables
- func DrawHeaderBox(s tcell.Screen, x, y, w, h int)
- func DrawLine(s tcell.Screen, x, y, l int)
- func DrawStr(s tcell.Screen, x, y int, style tcell.Style, str string)
- func DrawTableBox(s tcell.Screen, x, y, w, h int)
- func HandleCtrlC(u *Ui)
- func HandleDescribe(u *Ui)
- func HandleNavigateDown(u *Ui)
- func HandleNavigateUp(u *Ui)
- func HandleSearch(u *Ui)
- func HandleShell(u *Ui)
- type Handler
- type HandlerMap
- type HeaderInterface
- type InfoHeader
- type InstanceTable
- type TableInterface
- type Ui
- type UiInterface
Constants ¶
View Source
const ( KeySlash = 47 KeyD = 100 KeyS = 115 KeyJ = 106 KeyK = 107 )
View Source
const ( HeaderRow = "HeaderRow" TopRow = "TopRow" Row = "Row" SelectedRow = "SelectedRow" StoppedRow = "StoppedRow" CommandRow = "Command" )
Variables ¶
View Source
var ( DefaultHandlers = HandlerMap{ tcell.KeyCtrlC: HandleCtrlC, tcell.KeyUp: HandleNavigateUp, tcell.KeyDown: HandleNavigateDown, KeyK: HandleNavigateUp, KeyJ: HandleNavigateDown, KeyD: HandleDescribe, KeyS: HandleShell, KeySlash: HandleSearch, } )
Functions ¶
func DrawHeaderBox ¶ added in v0.1.0
func DrawHeaderBox(s tcell.Screen, x, y, w, h int)
func DrawTableBox ¶ added in v0.1.0
func DrawTableBox(s tcell.Screen, x, y, w, h int)
func HandleCtrlC ¶
func HandleCtrlC(u *Ui)
func HandleDescribe ¶ added in v0.2.0
func HandleDescribe(u *Ui)
func HandleNavigateDown ¶
func HandleNavigateDown(u *Ui)
func HandleNavigateUp ¶
func HandleNavigateUp(u *Ui)
func HandleSearch ¶ added in v0.2.0
func HandleSearch(u *Ui)
func HandleShell ¶ added in v0.2.0
func HandleShell(u *Ui)
Types ¶
type HandlerMap ¶
type HandlerMap map[tcell.Key]Handler
type HeaderInterface ¶ added in v0.1.0
type HeaderInterface interface {
Rows() []string
}
type InfoHeader ¶ added in v0.1.0
type InfoHeader struct { UserIdentity client.CallerIdentity Region string }
func (*InfoHeader) Rows ¶ added in v0.1.0
func (u *InfoHeader) Rows() []string
type InstanceTable ¶
func NewInstanceTable ¶ added in v0.1.0
func NewInstanceTable(instances []client.Instance, n int) *InstanceTable
func (*InstanceTable) Columns ¶ added in v0.1.0
func (t *InstanceTable) Columns() []string
func (*InstanceTable) OnTableResize ¶ added in v0.1.0
func (t *InstanceTable) OnTableResize(nNew int)
func (*InstanceTable) Rows ¶
func (t *InstanceTable) Rows() []string
type TableInterface ¶ added in v0.1.0
type Ui ¶
type Ui struct { Title string Header HeaderInterface Table TableInterface Handlers HandlerMap Screen tcell.Screen // contains filtered or unexported fields }
func (*Ui) NumberOfRowsDisplayed ¶ added in v0.1.0
func (*Ui) SetHandlers ¶
func (u *Ui) SetHandlers(h HandlerMap) *Ui
func (*Ui) SetHeader ¶ added in v0.1.0
func (u *Ui) SetHeader(h HeaderInterface) *Ui
func (*Ui) SetTable ¶
func (u *Ui) SetTable(t TableInterface) *Ui
type UiInterface ¶ added in v0.1.0
type UiInterface interface { Render() GetScreen() tcell.Screen }
Click to show internal directories.
Click to hide internal directories.