Documentation ¶
Index ¶
- Constants
- Variables
- type ActionFn
- type Cursors
- type Split
- type UI
- func (ui *UI) AddRequest(g *gocui.Gui, req *http.Request) error
- func (ui *UI) Display(g *gocui.Gui, view string, bytes []byte) error
- func (ui *UI) Info(g *gocui.Gui, format string, args ...interface{})
- func (ui *UI) Init(g *gocui.Gui) (chan<- error, error)
- func (ui *UI) Layout(g *gocui.Gui) error
- func (ui *UI) Response() *httplab.Response
Constants ¶
View Source
const ( // StatusView widget sets the response staus code StatusView = "status" // DelayView widget sets the response delay time DelayView = "delay" // HeaderView widget sets the response headers HeaderView = "headers" // BodyView widget sets the response body content BodyView = "body" // BodyFileView widget shows the file content to be set on the response body BodyFileView = "bodyfile" // RequestView widget displays the request RequestView = "request" // InfoView widget displays the bottom info bar InfoView = "info" // SaveView widget displays the saving location SaveView = "save" // ResponsesView widget displays the saved responses ResponsesView = "responses" // BindingsView widget displays binding help BindingsView = "bindings" // FileDialogView widget displays the popup to choose the response body file FileDialogView = "file-dialog" )
Variables ¶
View Source
var Bindings = &bindings{ {gocui.KeyTab, "Tab", "Next Input", nil, onNextView}, {0xFF, "Shift+Tab", "Previous Input", nil, nil}, {gocui.KeyCtrlA, "Ctrl+a", "Update Response", nil, onUpdateResponse}, {gocui.KeyCtrlR, "Ctrl+r", "Reset Request history", nil, onResetRequests}, {gocui.KeyCtrlS, "Ctrl+s", "Save Response as", nil, onSaveResponseAs}, {gocui.KeyCtrlF, "Ctrl+f", "Save Request as", nil, onSaveRequestAs}, {gocui.KeyCtrlL, "Ctrl+l", "Toggle Responses list", nil, onToggleResponsesList}, {gocui.KeyCtrlT, "Ctrl+t", "Toggle Response builder", nil, onToggleResponseBuilder}, {gocui.KeyCtrlO, "Ctrl+o", "Open Body file...", nil, onOpenFile}, {gocui.KeyCtrlB, "Ctrl+b", "Switch Body mode", nil, onSwitchBodyMode}, {gocui.KeyCtrlW, "Ctrl+w", "Toggle line wrapping", nil, onTogglLineWrapping}, {'q', "q", "Close Popup", []string{"bindings", "responses"}, onClosePopup}, {gocui.KeyPgup, "PgUp", "Previous Request", nil, onPrevRequest}, {gocui.KeyPgdn, "PgDown", "Next Request", nil, onNextRequest}, {gocui.KeyCtrlC, "Ctrl+c", "Quit", nil, onQuit}, }
Bindings are the list of binded key combinations
Functions ¶
This section is empty.
Types ¶
type Cursors ¶
type Cursors map[string]struct { // contains filtered or unexported fields }
Cursors stores the cursor position for a specific view this is used to restore mouse position when click is detected.
type Split ¶
type Split struct {
// contains filtered or unexported fields
}
Split simplifies the layout definition.
type UI ¶
type UI struct { AutoUpdate bool // contains filtered or unexported fields }
UI represent the state of the ui.
func (*UI) AddRequest ¶
AddRequest adds a new request to the UI.
Click to show internal directories.
Click to hide internal directories.