Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // HttpuMode is always initially set to default. HttpuMode = DefaultMode RequestView *gocui.View ResponseView *gocui.View CmdBarView *gocui.View StatusCodeView *gocui.View RequestTimeView *gocui.View )
var Commands map[string]Command = map[string]Command{ "clear": ClearCommand{}, "echo": EchoCommand{}, "list-commands": ListCommandsCommand{}, "stash": StashCommand{}, "welcome": WelcomeCommand{}, "!": ShellCommand{}, "list-env": ListEnvCommand{}, "set-env": SetEnvCommand{}, }
Commands is a map of all available commands to be used while in command mode.
Functions ¶
This section is empty.
Types ¶
type ClearCommand ¶
type ClearCommand struct { }
ClearCommand represents the command that will clear all contents from the request view screen.
Usage: clear
type Command ¶
Command requires each member to have an Execute func to allow each and any command to be executable while in command mode.
type EchoCommand ¶
type EchoCommand struct { }
EchoCommand represents the command that echos text out into the request view screen.
Usage: echo Hello, World!
type ListCommandsCommand ¶
type ListCommandsCommand struct { }
ListCommandsCommand represents the command that will list all available commands that can be ran while in command mode.
Usage: list-commands
type ListEnvCommand ¶
type ListEnvCommand struct { }
type Mode ¶
type Mode int
Mode is the mode of the command bar, it being either in default mode, or toggled into command mode, in which additional commands within httpu can be used.
Default is always set to defaultMode, in which commands are not used.
type SetEnvCommand ¶
type SetEnvCommand struct { }
type ShellCommand ¶
type ShellCommand struct { }
type StashCommand ¶
type StashCommand struct { }
type UiSpec ¶
type UiSpec struct { RequestViewSpec ViewSpec ResponseViewSpec ViewSpec CmdBarViewSpec ViewSpec StatusCodeViewSpec ViewSpec RequestTimeViewSpec ViewSpec // contains filtered or unexported fields }
UiSpec represents the default dimensions needed to create a user interface that matches the builtin termnial user interface. Other Go packages / programs can use these dimensions / settings to get a similar look to the default.
type ViewSpec ¶
func (ViewSpec) Dimensions ¶
type WelcomeCommand ¶
type WelcomeCommand struct { }