Documentation
¶
Index ¶
- Variables
- func PrettyPrintJSON(input string) string
- type AppController
- type AppView
- func (v *AppView) Bind(controller AppController)
- func (v *AppView) GetPrimitive() tview.Primitive
- func (v *AppView) GetSelectedHost() string
- func (v *AppView) GetStatusBar() tview.Primitive
- func (v *AppView) OnStatusInputSubmit(cb func(value string))
- func (v *AppView) RequestSelected(req model.Request)
- func (v *AppView) SetHosts(hosts []model.Host)
- func (v *AppView) SetRequests(requests []model.Request)
- func (v *AppView) SetResponse(body string)
- func (v *AppView) SetSelectedRequest(index int)
- func (v *AppView) SetStatus(status string)
- type HeadersTable
- type HostDropdown
- type MethodDropdown
- type RequestBodyArea
- type RequestHeader
- type RequestList
- type ResponseView
- type StatusBar
- type UrlInput
Constants ¶
This section is empty.
Variables ¶
View Source
var BLACK = tcell.ColorBlack
View Source
var DEFAULT = tcell.ColorDefault
View Source
var GREEN = tcell.ColorLime
View Source
var ORANGE = tcell.ColorOrange
View Source
var PURPLE = tcell.ColorMediumPurple
Functions ¶
func PrettyPrintJSON ¶
Types ¶
type AppController ¶
type AppController interface { SendRequest(index int) AddRequest() EditRequest() DeleteRequest(index int) GetRequests() ([]model.Request, error) UpdateRequest(model.Request) SelectRequest(index int) SetRequests() HandleRequestSelected(index int) EditRequestBody(req model.Request) DeleteHost(host model.Host) GetHosts() ([]model.Host, error) SetHosts() AddHost() }
type AppView ¶
type AppView struct { StatusBar *StatusBar MethodDropdown *MethodDropdown HostDropdown *HostDropdown RequestBody *RequestBodyArea RequestList *RequestList ResponseBox *ResponseView // contains filtered or unexported fields }
func NewAppView ¶
func NewAppView() *AppView
func (*AppView) Bind ¶
func (v *AppView) Bind(controller AppController)
func (*AppView) GetPrimitive ¶
func (*AppView) GetSelectedHost ¶
func (*AppView) GetStatusBar ¶
func (*AppView) OnStatusInputSubmit ¶
func (*AppView) RequestSelected ¶
func (*AppView) SetRequests ¶
func (*AppView) SetResponse ¶
func (*AppView) SetSelectedRequest ¶
type HeadersTable ¶
type HeadersTable struct {
// contains filtered or unexported fields
}
func NewHeadersTable ¶
func NewHeadersTable() *HeadersTable
func (*HeadersTable) DisplayHeaders ¶
func (h *HeadersTable) DisplayHeaders(headers []RequestHeader)
func (*HeadersTable) GetPrimitive ¶
func (h *HeadersTable) GetPrimitive() tview.Primitive
type HostDropdown ¶
type HostDropdown struct {
// contains filtered or unexported fields
}
func NewHostDropdown ¶
func NewHostDropdown() *HostDropdown
func (*HostDropdown) Bind ¶
func (h *HostDropdown) Bind(handler AppController)
func (*HostDropdown) GetPrimitive ¶
func (h *HostDropdown) GetPrimitive() tview.Primitive
func (*HostDropdown) GetSelectedHost ¶
func (h *HostDropdown) GetSelectedHost() string
func (*HostDropdown) SetHosts ¶
func (h *HostDropdown) SetHosts(hosts []model.Host)
type MethodDropdown ¶
type MethodDropdown struct {
// contains filtered or unexported fields
}
func NewMethodDropdown ¶
func NewMethodDropdown() *MethodDropdown
func (*MethodDropdown) Bind ¶
func (m *MethodDropdown) Bind(handler AppController)
func (*MethodDropdown) GetPrimitive ¶
func (m *MethodDropdown) GetPrimitive() tview.Primitive
func (*MethodDropdown) SetCurrentOption ¶
func (m *MethodDropdown) SetCurrentOption(req model.Request)
type RequestBodyArea ¶
type RequestBodyArea struct {
// contains filtered or unexported fields
}
func NewRequestBodyArea ¶
func NewRequestBodyArea() *RequestBodyArea
func (*RequestBodyArea) Bind ¶
func (r *RequestBodyArea) Bind(handler AppController)
func (*RequestBodyArea) GetPrimitive ¶
func (r *RequestBodyArea) GetPrimitive() tview.Primitive
func (*RequestBodyArea) SetRequest ¶
func (r *RequestBodyArea) SetRequest(req model.Request)
type RequestHeader ¶
type RequestList ¶
type RequestList struct {
// contains filtered or unexported fields
}
func NewRequestList ¶
func NewRequestList() *RequestList
func (*RequestList) Bind ¶
func (r *RequestList) Bind(handler AppController)
func (*RequestList) GetPrimitive ¶
func (r *RequestList) GetPrimitive() tview.Primitive
func (*RequestList) GetSelectedRequest ¶
func (r *RequestList) GetSelectedRequest() int
func (*RequestList) SetContent ¶
func (r *RequestList) SetContent(requests []model.Request)
func (*RequestList) SetSelectedRequest ¶
func (r *RequestList) SetSelectedRequest(index int)
type ResponseView ¶
type ResponseView struct {
// contains filtered or unexported fields
}
func NewResponseView ¶
func NewResponseView() *ResponseView
func (*ResponseView) GetPrimitive ¶
func (r *ResponseView) GetPrimitive() tview.Primitive
func (*ResponseView) SetContent ¶
func (r *ResponseView) SetContent(text string)
type StatusBar ¶
type StatusBar struct { Input *tview.InputField // contains filtered or unexported fields }
func NewStatusBar ¶
func NewStatusBar() *StatusBar
func (*StatusBar) GetInputField ¶
func (*StatusBar) GetPrimitive ¶
type UrlInput ¶
type UrlInput struct {
// contains filtered or unexported fields
}
func NewUrlInput ¶
func NewUrlInput() *UrlInput
func (*UrlInput) Bind ¶
func (u *UrlInput) Bind(handler AppController)
func (*UrlInput) GetPrimitive ¶
Click to show internal directories.
Click to hide internal directories.