Documentation ¶
Index ¶
- Constants
- Variables
- type Binding
- type Components
- type CreateEditOptions
- type CreateMenuOptions
- type Gui
- func (gui *Gui) CurrentView() *gocui.View
- func (gui *Gui) DeleteRequest(request *commands.Request) error
- func (gui *Gui) Edit(opts CreateEditOptions) error
- func (gui *Gui) FocusY(selectedY int, lineCount int, v *gocui.View)
- func (gui *Gui) GetInitialKeybindings() []*Binding
- func (gui *Gui) GetRequestInfoView() *gocui.View
- func (gui *Gui) GetResponseInfoView() *gocui.View
- func (gui *Gui) GetUrlView() *gocui.View
- func (gui *Gui) IsCurrentView(view *gocui.View) bool
- func (gui *Gui) Menu(opts CreateMenuOptions) error
- func (gui *Gui) RenderErrorString(s string)
- func (gui *Gui) Run() error
- func (gui *Gui) SaveRequest(request *commands.Request) error
- func (gui *Gui) SendRequest(request *commands.Request) error
- func (gui *Gui) SetColorScheme() error
- func (gui *Gui) Update(f func() error)
- type Views
Constants ¶
View Source
const ( REQUESTS_VIEW = "requests" URL_VIEW = "url" PARAMS_VIEW = "params" RESPONSE_VIEW = "response" MENU_VIEW = "menu" EDIT_VIEW = "edit" )
View Source
const UNKNOWN_VIEW_ERROR_MSG = "unknown view"
Variables ¶
View Source
var VIEW_POSITIONS = map[string]viewPosition{ REQUESTS_VIEW: { position{0.0, 0}, position{0.0, 0}, position{0.25, -1}, position{1.0, -1}, }, URL_VIEW: { position{0.25, 0}, position{0.0, 0}, position{1.0, -1}, position{0.1, -1}, }, PARAMS_VIEW: { position{0.25, 0}, position{0.1, 0}, position{0.6, -1}, position{1.0, -1}, }, RESPONSE_VIEW: { position{0.6, 0}, position{0.1, 0}, position{1.0, -1}, position{1.0, -1}, }, MENU_VIEW: { position{0.25, 0}, position{0.25, 0}, position{0.75, -1}, position{0.75, -1}, }, EDIT_VIEW: { position{0.25, 0}, position{0.25, 0}, position{0.75, -1}, position{0.75, -1}, }, }
Functions ¶
This section is empty.
Types ¶
type Binding ¶
type Binding struct { ViewName string Handler func(*gocui.Gui, *gocui.View) error Key interface{} Modifier gocui.Modifier Description string }
Binding - a keybinding mapping a key and modifier to a handler. The keypress is only handled if the given view has focus, or handled globally if the view is ""
type Components ¶
type Components struct { Requests *components.ListComponent[*commands.Request] Menu *components.ListComponent[*types.MenuItem] }
type CreateEditOptions ¶
type CreateMenuOptions ¶
type Gui ¶
type Gui struct { Config *config.AppConfig Log *logrus.Entry OSCommands *commands.OSCommand HttpCommands *commands.HttpCommand Views Views Components Components // contains filtered or unexported fields }
Gui wraps the gocui Gui object which handles rendering and events
func NewGuiWrapper ¶
func (*Gui) CurrentView ¶
func (*Gui) Edit ¶
func (gui *Gui) Edit(opts CreateEditOptions) error
func (*Gui) GetInitialKeybindings ¶
func (*Gui) GetRequestInfoView ¶
func (*Gui) GetResponseInfoView ¶
func (*Gui) GetUrlView ¶
func (*Gui) Menu ¶
func (gui *Gui) Menu(opts CreateMenuOptions) error
func (*Gui) RenderErrorString ¶
func (*Gui) SetColorScheme ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
This is copy paste of jesseduffield lazydocker filteredlist
|
This is copy paste of jesseduffield lazydocker filteredlist |
Click to show internal directories.
Click to hide internal directories.