Documentation ¶
Index ¶
- type Editor
- func (editor *Editor) GetLowerPaneTitle() string
- func (editor *Editor) GetUpperPaneTitle() string
- func (editor *Editor) Render(app *tview.Application)
- func (editor *Editor) SetCommandExecFunc(fn func(string) error)
- func (editor *Editor) SetErrorFunc(fn func(error))
- func (editor *Editor) SetLowerPaneTitle(title string)
- func (editor *Editor) SetUpperPaneTitle(title string)
- type Input
- type Logger
- type Output
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Editor ¶
type Editor struct { View *tview.Flex Input *Input Logger *Logger Output *Output // contains filtered or unexported fields }
Editor implements the methods to manipulate modify editor behavior and manipulate ui elements
func NewEditor ¶
func NewEditor() *Editor
NewEditor will return a reference to the complete editor ui used to run commands in interactive mode
func (*Editor) GetLowerPaneTitle ¶
GetLowerPaneTitle will return the title for lower pane
func (*Editor) GetUpperPaneTitle ¶
GetUpperPaneTitle will return the title for upper pane
func (*Editor) Render ¶
func (editor *Editor) Render(app *tview.Application)
Render initializes all the ui elements and adds them to the parent container
func (*Editor) SetCommandExecFunc ¶
SetCommandExecFunc will set an exec function which is invoked when user presses enter key after entering the command
func (*Editor) SetErrorFunc ¶
SetErrorFunc will set an error function which will be invoked when there an error occurs while executing a command
func (*Editor) SetLowerPaneTitle ¶
SetLowerPaneTitle will set the title for lower pane. If no title is provided the pane will be rendered without title
func (*Editor) SetUpperPaneTitle ¶
SetUpperPaneTitle will set the title for upper pane. If no title is provided the pane will be rendered without title
type Input ¶
type Input struct { *tview.InputField // contains filtered or unexported fields }
Input handles all the commands entered during interactive mode
type Logger ¶
Logger provides an option to log background logs to ui
func (*Logger) ClearLogger ¶
func (l *Logger) ClearLogger()
ClearLogger will clear all data from logger pane
func (*Logger) SetPrimary ¶ added in v0.1.1
SetPrimary sets the primary writer for logger
func (*Logger) SetPrimaryAvailable ¶ added in v0.1.1
SetPrimaryAvailable decides if the primary writer can be used or not
func (*Logger) SetSecondary ¶ added in v0.1.1
SetSecondary sets the secondary writer for logger