Documentation ¶
Index ¶
Constants ¶
View Source
const ( CmpEq = iota CmpNeq CmpGt CmpGte CmpLt CmpLte CmpMatch CmpNoMatch )
View Source
const ( ColumnDefault = iota ColumnCollapsed ColumnExpanded // TODO: Move this to the Modified attribute ColumnAligned )
View Source
const CellSeparator = " │ "
View Source
const HelpText = `` /* 3094-byte string literal not displayed */
View Source
const HiliteBg = termbox.ColorWhite
View Source
const HiliteFg = termbox.ColorBlack | termbox.AttrBold
View Source
const MaxCellWidth = 20
View Source
const OpChars = "!=><~"
View Source
const RowIndicator = '»'
Variables ¶
View Source
var CmpOpRegex = regexp.MustCompile(`^(.+?)([!=><~]+)(.+)$`)
Functions ¶
This section is empty.
Types ¶
type ColumnDisplay ¶
type ColumnDisplay int
type ColumnFilter ¶
type ColumnFilter struct {
// contains filtered or unexported fields
}
func (ColumnFilter) Matches ¶
func (f ColumnFilter) Matches(row []string) bool
func (ColumnFilter) String ¶
func (f ColumnFilter) String() string
type ComparisonType ¶
type ComparisonType int
type EmptyFilter ¶
type EmptyFilter struct{}
func (EmptyFilter) Matches ¶
func (f EmptyFilter) Matches([]string) bool
func (EmptyFilter) String ¶
func (f EmptyFilter) String() string
type HandlerColumnSelect ¶
type HandlerColumnSelect struct { HandlerDefault // contains filtered or unexported fields }
func NewColumnSelect ¶
func NewColumnSelect(ui *UI) *HandlerColumnSelect
func (*HandlerColumnSelect) HandleKey ¶
func (h *HandlerColumnSelect) HandleKey(ev termbox.Event)
func (*HandlerColumnSelect) Len ¶
func (h *HandlerColumnSelect) Len() int
func (*HandlerColumnSelect) Less ¶
func (h *HandlerColumnSelect) Less(i, j int) bool
func (*HandlerColumnSelect) Repaint ¶
func (h *HandlerColumnSelect) Repaint()
func (*HandlerColumnSelect) Swap ¶
func (h *HandlerColumnSelect) Swap(i, j int)
type HandlerDefault ¶
type HandlerDefault struct {
// contains filtered or unexported fields
}
func (*HandlerDefault) HandleKey ¶
func (h *HandlerDefault) HandleKey(ev termbox.Event)
func (*HandlerDefault) Repaint ¶
func (h *HandlerDefault) Repaint()
type HandlerFilter ¶
type HandlerFilter struct { HandlerDefault // contains filtered or unexported fields }
func (*HandlerFilter) HandleKey ¶
func (h *HandlerFilter) HandleKey(ev termbox.Event)
func (*HandlerFilter) Repaint ¶
func (h *HandlerFilter) Repaint()
type HandlerPopup ¶
type HandlerPopup struct { HandlerDefault // contains filtered or unexported fields }
func NewPopup ¶
func NewPopup(ui *UI, content string) *HandlerPopup
func (*HandlerPopup) HandleKey ¶
func (h *HandlerPopup) HandleKey(ev termbox.Event)
func (*HandlerPopup) Repaint ¶
func (h *HandlerPopup) Repaint()
type HandlerRowSelect ¶
type HandlerRowSelect struct { HandlerDefault // contains filtered or unexported fields }
func (*HandlerRowSelect) HandleKey ¶
func (h *HandlerRowSelect) HandleKey(ev termbox.Event)
func (*HandlerRowSelect) Repaint ¶
func (h *HandlerRowSelect) Repaint()
type HandlerShell ¶
type HandlerShell struct { HandlerDefault // contains filtered or unexported fields }
func (*HandlerShell) HandleKey ¶
func (h *HandlerShell) HandleKey(ev termbox.Event)
func (*HandlerShell) Repaint ¶
func (h *HandlerShell) Repaint()
type ModeHandler ¶
type ModeHandler interface { HandleKey(ev termbox.Event) Repaint() }
type TabularData ¶
func ReadCSVFile ¶
func ReadMySQLTable ¶
func ReadMySQLTable(reader io.Reader, count int64) (*TabularData, error)
Parses MySQL output format:
+------+------+------+ | colA | colB | colC | +------+------+------+ | foo | bar | baz | | foo2 | bar2 | baz2 | +------+------+------+ 2 rows in set
func ReadPSQLTable ¶
func ReadPSQLTable(reader io.Reader, count int64) (*TabularData, error)
Parses Postgres output format:
colA | colB | colC
------+------+-----
foo | bar | baz foo2 | bar2 | baz2
(2 rows)
Click to show internal directories.
Click to hide internal directories.