Documentation
¶
Index ¶
- Constants
- func ExecutePostResponseScriptCmd(executor api.ScriptExecutor, script string, req *api.ScriptRequest, ...) tea.Cmd
- func ExecutePreRequestScriptCmd(executor api.ScriptExecutor, script string, req *api.Request, ...) tea.Cmd
- func ExportCollectionToPostman(collection *api.CollectionFile, outputPath string) tea.Cmd
- func ExportEnvironmentToPostman(env *api.EnvironmentFile, outputPath string) tea.Cmd
- func ImportPostmanFile(filePath string) tea.Cmd
- func IntPtr(i int) *int
- func SaveImportedCollection(collection *api.CollectionFile, workspacePath string) error
- func SaveImportedEnvironment(env *api.EnvironmentFile, workspacePath string) error
- func SendHTTPRequestCmd(req *api.Request) tea.Cmd
- func StringPtr(s string) *string
- type AuthField
- type AuthType
- type BodyType
- type CollectionsView
- func (c *CollectionsView) AddFolderToCollection(name string, parentNode *components.TreeNode) error
- func (c *CollectionsView) AddRequestToCollection(name, method, url string, parentNode *components.TreeNode) error
- func (c *CollectionsView) DeleteNode(node *components.TreeNode) error
- func (c *CollectionsView) DuplicateNode(node *components.TreeNode) error
- func (c *CollectionsView) FindCollectionByNode(node *components.TreeNode) *api.CollectionFile
- func (c *CollectionsView) GetClipboard() *components.TreeNode
- func (c *CollectionsView) GetCollections() []*api.CollectionFile
- func (c *CollectionsView) GetCollectionsPath() string
- func (c *CollectionsView) GetFolderPath(node *components.TreeNode) []string
- func (c *CollectionsView) GetFolderPathIncluding(node *components.TreeNode) []string
- func (c *CollectionsView) GetJumpTargets(startRow, startCol int) []JumpTarget
- func (c CollectionsView) GetTree() *components.Tree
- func (c *CollectionsView) PasteNode(clipboard *components.TreeNode, target *components.TreeNode) error
- func (c *CollectionsView) ReloadCollections()
- func (c *CollectionsView) RenameNode(node *components.TreeNode, newName string) error
- func (c *CollectionsView) SelectIndex(index int)
- func (c CollectionsView) Selected() *components.TreeNode
- func (c *CollectionsView) SetClipboard(node *components.TreeNode)
- func (c CollectionsView) Update(msg tea.Msg, cfg *config.GlobalConfig) (CollectionsView, tea.Cmd)
- func (c *CollectionsView) UpdateRequest(node *components.TreeNode, name, method, url string) error
- func (c *CollectionsView) UpdateRequestAuthByID(requestID string, auth *api.AuthConfig) error
- func (c *CollectionsView) UpdateRequestBodyByID(requestID, bodyType, content string) error
- func (c *CollectionsView) UpdateRequestScriptsByID(requestID, preRequest, postRequest string) error
- func (c *CollectionsView) UpdateRequestURLByID(requestID, newURL string) error
- func (c CollectionsView) View(width, height int, active bool) string
- type CommandExecuteMsg
- type CommandInput
- type ConsoleStatusMsg
- type ConsoleView
- func (c *ConsoleView) GetSelectedEntry(history *api.ConsoleHistory) *api.ConsoleEntry
- func (c *ConsoleView) IsExpanded() bool
- func (c *ConsoleView) Reset()
- func (c *ConsoleView) SetDimensions(width, height int)
- func (c ConsoleView) Update(msg tea.Msg, history *api.ConsoleHistory, cfg *config.GlobalConfig) (ConsoleView, tea.Cmd)
- func (c ConsoleView) View(width, height int, history *api.ConsoleHistory, active bool) string
- type CopyToClipboardMsg
- type CurlExportedMsg
- type CurlImportedMsg
- type EnvClipboard
- type EnvNodeType
- type EnvTreeNode
- type EnvironmentsView
- func (e *EnvironmentsView) GetActiveEnvironment() *api.EnvironmentFile
- func (e *EnvironmentsView) GetActiveEnvironmentName() string
- func (e *EnvironmentsView) GetActiveEnvironmentVariables() map[string]string
- func (e *EnvironmentsView) GetBreadcrumb() []string
- func (e *EnvironmentsView) HasActiveModal() bool
- func (e *EnvironmentsView) HasSearchQuery() bool
- func (e *EnvironmentsView) IsSearching() bool
- func (e *EnvironmentsView) ReloadEnvironments()
- func (e *EnvironmentsView) RenderModal(screenWidth, screenHeight int) string
- func (e *EnvironmentsView) SaveActiveEnvironment() error
- func (e *EnvironmentsView) SetActiveEnvironmentName(name string)
- func (e EnvironmentsView) Update(msg tea.Msg, cfg *config.GlobalConfig) (EnvironmentsView, tea.Cmd)
- func (e EnvironmentsView) View(width, height int, active bool) string
- type HTTPResponseMsg
- type HTTPSendingMsg
- type HideImportModalMsg
- type HideOpenAPIImportModalMsg
- type ImportModalModel
- func (m *ImportModalModel) ClearError()
- func (m *ImportModalModel) GetValue() string
- func (m *ImportModalModel) Hide()
- func (m *ImportModalModel) IsVisible() bool
- func (m *ImportModalModel) SetError(err string)
- func (m *ImportModalModel) SetSize(width, height int)
- func (m *ImportModalModel) Show()
- func (m *ImportModalModel) Update(msg tea.Msg) (*ImportModalModel, tea.Cmd)
- func (m *ImportModalModel) View() string
- type JumpAction
- type JumpModeState
- func (m *JumpModeState) Activate(currentPanel PanelType)
- func (m *JumpModeState) ActivateAllPanels()
- func (m *JumpModeState) AssignLabels(targets []JumpTarget)
- func (m *JumpModeState) CycleScopePanel() PanelType
- func (m *JumpModeState) Deactivate()
- func (m *JumpModeState) GetFilter() string
- func (m *JumpModeState) GetScopePanel() PanelType
- func (m *JumpModeState) GetVisibleTargets() []JumpTarget
- func (m *JumpModeState) HandleKey(key string) (target *JumpTarget, shouldCancel bool)
- func (m *JumpModeState) IsActive() bool
- func (m *JumpModeState) IsAllPanels() bool
- func (m *JumpModeState) RenderOverlay(baseView string, width, height int) string
- func (m *JumpModeState) SetTargets(targets []JumpTarget)
- type JumpTarget
- type KeyValueClipboard
- type LayoutMode
- type LeftPanel
- func (l *LeftPanel) GetActiveTab() LeftPanelTab
- func (l *LeftPanel) GetCollections() *CollectionsView
- func (l *LeftPanel) GetEnvironments() *EnvironmentsView
- func (l *LeftPanel) GetJumpTargets(startRow, startCol int) []JumpTarget
- func (l *LeftPanel) GetSessionState() session.CollectionsPanelState
- func (l *LeftPanel) HasSearchQuery() bool
- func (l *LeftPanel) IsSearching() bool
- func (l LeftPanel) RenderTabs(width int, active bool, borderColor lipgloss.Color) string
- func (l *LeftPanel) SetActiveTab(tab LeftPanelTab)
- func (l *LeftPanel) SetSessionState(state session.CollectionsPanelState)
- func (l LeftPanel) Update(msg tea.Msg, cfg *config.GlobalConfig) (LeftPanel, tea.Cmd)
- func (l LeftPanel) View(width, height int, active bool) string
- type LeftPanelTab
- type LoaderTickMsg
- type Mode
- type ModeChangeMsg
- type Model
- type OpenAPIImportCompleteMsg
- type OpenAPIImportModal
- func (m *OpenAPIImportModal) GetFilePath() string
- func (m *OpenAPIImportModal) Hide()
- func (m *OpenAPIImportModal) IsVisible() bool
- func (m *OpenAPIImportModal) SetError(err string)
- func (m *OpenAPIImportModal) SetSize(width, height int)
- func (m *OpenAPIImportModal) Show()
- func (m *OpenAPIImportModal) Update(msg tea.Msg) (*OpenAPIImportModal, tea.Cmd)
- func (m *OpenAPIImportModal) View() string
- type OpenAPIImportState
- type OpenAPIImportStats
- type OpenAPIImportedMsg
- type OpenAPISpinnerTickMsg
- type PanelType
- type ParamsSection
- type PostResponseScriptResultMsg
- type PostmanExportedMsg
- type PostmanImportErrorMsg
- type PostmanImportedMsg
- type PreRequestScriptResultMsg
- type RequestAuthChangedMsg
- type RequestBodyChangedMsg
- type RequestDeleteMsg
- type RequestDuplicateMsg
- type RequestEditMsg
- type RequestNewMsg
- type RequestParamToggleMsg
- type RequestParamsChangedMsg
- type RequestPasteMsg
- type RequestRenameMsg
- type RequestScriptsChangedMsg
- type RequestURLChangedMsg
- type RequestView
- func (r *RequestView) AddPathParamToURL(paramName string)
- func (r *RequestView) AddRow(key, value string)
- func (r *RequestView) BuildURLFromParams() string
- func (r *RequestView) BuildURLWithPathParams() string
- func (r *RequestView) DeleteRow(index int)
- func (r *RequestView) DuplicateRow(index int)
- func (r *RequestView) ExtractPathParamsFromURL() []string
- func (r *RequestView) ExtractVariablesFromURL() []string
- func (r *RequestView) GetActiveScriptsEditor() *components.Editor
- func (r *RequestView) GetActiveTab() string
- func (r *RequestView) GetAuthConfig() *api.AuthConfig
- func (r *RequestView) GetBodyContent() string
- func (r *RequestView) GetClipboard() *KeyValueClipboard
- func (r *RequestView) GetCurrentRequestID() string
- func (r *RequestView) GetHeadersTable() *components.Table
- func (r *RequestView) GetJumpTargets(startRow, startCol int) []JumpTarget
- func (r *RequestView) GetMethod() string
- func (r *RequestView) GetParamsSection() ParamsSection
- func (r *RequestView) GetPathParamsTable() *components.Table
- func (r *RequestView) GetPostRequestScript() string
- func (r *RequestView) GetPreRequestScript() string
- func (r *RequestView) GetSessionState() session.RequestPanelState
- func (r *RequestView) GetTitle() string
- func (r *RequestView) GetURL() string
- func (r *RequestView) IsAuthEditing() bool
- func (r *RequestView) IsBodyPreviewMode() bool
- func (r *RequestView) IsEditingURL() bool
- func (r *RequestView) IsEditorActive() bool
- func (r *RequestView) IsEditorInInsertMode() bool
- func (r *RequestView) IsScriptsEditorInInsertMode() bool
- func (r *RequestView) JumpTo(elementID string)
- func (r *RequestView) LoadCollectionRequest(req *api.CollectionRequest)
- func (r *RequestView) LoadRequest(id, name, method, url string)
- func (r *RequestView) ParsePathParams()
- func (r *RequestView) ParseURLParams()
- func (r *RequestView) RenameRow(index int, newKey string)
- func (r *RequestView) SetClipboard(key, value string)
- func (r *RequestView) SetEditingURL(editing bool)
- func (r *RequestView) SetEnvironmentVariables(vars map[string]string)
- func (r *RequestView) SetSessionState(state session.RequestPanelState)
- func (r *RequestView) SetURL(url string)
- func (r *RequestView) SyncURLFromParams() string
- func (r RequestView) Update(msg tea.Msg, cfg *config.GlobalConfig) (RequestView, tea.Cmd)
- func (r *RequestView) UpdateRow(index int, key, value string)
- func (r RequestView) View(width, height int, active bool) string
- type RequestYankMsg
- type ResendRequestMsg
- type ResponseView
- func (r *ResponseView) ClearResponse()
- func (r *ResponseView) ClearTestResults()
- func (r *ResponseView) GetActiveTab() string
- func (r *ResponseView) GetJumpTargets(startRow, startCol int) []JumpTarget
- func (r *ResponseView) GetResponseSize() string
- func (r *ResponseView) GetResponseTime() string
- func (r *ResponseView) GetSessionState() session.ResponsePanelState
- func (r *ResponseView) GetStatusCode() int
- func (r *ResponseView) GetTestResults() []api.AssertionResult
- func (r *ResponseView) IsLoading() bool
- func (r *ResponseView) JumpTo(elementID string)
- func (r *ResponseView) SetLoading(loading bool)
- func (r *ResponseView) SetResponse(statusCode int, status string, headers map[string]string, ...)
- func (r *ResponseView) SetSessionState(state session.ResponsePanelState)
- func (r *ResponseView) SetTestResults(results []api.AssertionResult)
- func (r *ResponseView) TickLoader()
- func (r ResponseView) Update(msg tea.Msg, cfg *config.GlobalConfig) (ResponseView, tea.Cmd)
- func (r ResponseView) UpdateWithHistory(msg tea.Msg, cfg *config.GlobalConfig, history *api.ConsoleHistory) (ResponseView, tea.Cmd)
- func (r ResponseView) View(width, height int, active bool) string
- func (r ResponseView) ViewWithHistory(width, height int, active bool, history *api.ConsoleHistory) string
- type ScriptAssertionResultsMsg
- type ScriptConsoleFormatter
- func (f *ScriptConsoleFormatter) FormatAssertionResults(results []api.AssertionResult, width int) string
- func (f *ScriptConsoleFormatter) FormatEntries(entries []api.ConsoleLogEntry, width, maxLines int) string
- func (f *ScriptConsoleFormatter) FormatEntry(entry api.ConsoleLogEntry, width int) string
- func (f *ScriptConsoleFormatter) FormatEnvChanges(changes []api.EnvChange, width int) string
- func (f *ScriptConsoleFormatter) FormatHeader(scriptType ScriptType, width int) string
- func (f *ScriptConsoleFormatter) FormatScriptError(err *api.ScriptErrorInfo, width int) string
- type ScriptConsoleOutputMsg
- type ScriptEnvChangesMsg
- type ScriptErrorDisplayMsg
- type ScriptExecutionRequestMsg
- type ScriptExecutionResultMsg
- type ScriptType
- type ScriptsSection
- type SessionSaveTickMsg
- type ShowImportModalMsg
- type ShowOpenAPIImportModalMsg
- type StatusBadge
- type StatusBar
- func (s *StatusBar) ClearHTTPStatus()
- func (s *StatusBar) ClearMessage()
- func (s *StatusBar) Error(err error)
- func (s *StatusBar) GetMode() Mode
- func (s *StatusBar) Info(msg string)
- func (s *StatusBar) SetBreadcrumb(parts ...string)
- func (s *StatusBar) SetEnvironment(name string)
- func (s *StatusBar) SetFullscreen(fullscreen bool)
- func (s *StatusBar) SetHTTPStatus(code int, text string)
- func (s *StatusBar) SetHints(hints string)
- func (s *StatusBar) SetMethod(method string)
- func (s *StatusBar) SetMode(mode Mode)
- func (s *StatusBar) ShowMessage(msg string, duration time.Duration)
- func (s *StatusBar) Success(action, target string)
- func (s *StatusBar) View(width int) string
- type StatusType
- type StatusUpdateMsg
- type SwitchToConsoleTabMsg
- type SwitchToResponseTabMsg
Constants ¶
const ( CmdQuit = "q" CmdQuitLong = "quit" CmdWrite = "w" CmdWriteLong = "write" CmdWriteQuit = "wq" CmdWorkspace = "workspace" CmdWorkspaceShort = "ws" CmdHelp = "help" CmdSet = "set" CmdEnv = "env" CmdCollections = "collections" CmdCollectionsShort = "col" CmdImport = "import" CmdExport = "export" )
Common command constants
const ( WorkspaceList = "list" WorkspaceSwitch = "switch" WorkspaceCreate = "create" WorkspaceDelete = "delete" )
Workspace subcommands
const ( ImportPostman = "postman" ExportPostman = "postman" )
Import/Export subcommands
const ( MinTerminalWidth = 80 MinTerminalHeight = 24 )
Minimum terminal size constants
const ( // ResponsiveWidthThreshold - below this width, switch to horizontal layout ResponsiveWidthThreshold = 100 // ResponsiveHeightThreshold - below this height, switch to horizontal layout ResponsiveHeightThreshold = 30 )
Responsive breakpoints for layout switching
const MessageDuration = 2 * time.Second
Message duration constant - 2 seconds for all action messages
Variables ¶
This section is empty.
Functions ¶
func ExecutePostResponseScriptCmd ¶ added in v1.3.0
func ExecutePostResponseScriptCmd(executor api.ScriptExecutor, script string, req *api.ScriptRequest, resp *api.ScriptResponse, envFile *api.EnvironmentFile) tea.Cmd
ExecutePostResponseScriptCmd creates a command to execute post-response script
func ExecutePreRequestScriptCmd ¶ added in v1.3.0
func ExecutePreRequestScriptCmd(executor api.ScriptExecutor, script string, req *api.Request, envFile *api.EnvironmentFile) tea.Cmd
ExecutePreRequestScriptCmd creates a command to execute pre-request script
func ExportCollectionToPostman ¶ added in v1.2.0
func ExportCollectionToPostman(collection *api.CollectionFile, outputPath string) tea.Cmd
ExportCollectionToPostman exports a LazyCurl collection to Postman format.
func ExportEnvironmentToPostman ¶ added in v1.2.0
func ExportEnvironmentToPostman(env *api.EnvironmentFile, outputPath string) tea.Cmd
ExportEnvironmentToPostman exports a LazyCurl environment to Postman format.
func ImportPostmanFile ¶ added in v1.2.0
ImportPostmanFile imports a Postman collection or environment file. It auto-detects the file type and imports accordingly.
func SaveImportedCollection ¶ added in v1.2.0
func SaveImportedCollection(collection *api.CollectionFile, workspacePath string) error
SaveImportedCollection saves an imported collection to the workspace.
func SaveImportedEnvironment ¶ added in v1.2.0
func SaveImportedEnvironment(env *api.EnvironmentFile, workspacePath string) error
SaveImportedEnvironment saves an imported environment to the workspace.
func SendHTTPRequestCmd ¶
SendHTTPRequestCmd creates a command to send an HTTP request
Types ¶
type AuthField ¶
type AuthField int
AuthField represents which field is selected in Authorization tab
type CollectionsView ¶
type CollectionsView struct {
// contains filtered or unexported fields
}
CollectionsView represents the collections panel
func NewCollectionsView ¶
func NewCollectionsView(workspacePath string) *CollectionsView
NewCollectionsView creates a new collections view
func (*CollectionsView) AddFolderToCollection ¶
func (c *CollectionsView) AddFolderToCollection(name string, parentNode *components.TreeNode) error
AddFolderToCollection adds a new folder to the appropriate collection
func (*CollectionsView) AddRequestToCollection ¶
func (c *CollectionsView) AddRequestToCollection(name, method, url string, parentNode *components.TreeNode) error
AddRequestToCollection adds a new request to the appropriate collection
func (*CollectionsView) DeleteNode ¶
func (c *CollectionsView) DeleteNode(node *components.TreeNode) error
DeleteNode deletes a tree node (request or folder)
func (*CollectionsView) DuplicateNode ¶
func (c *CollectionsView) DuplicateNode(node *components.TreeNode) error
DuplicateNode duplicates a tree node (request or folder)
func (*CollectionsView) FindCollectionByNode ¶
func (c *CollectionsView) FindCollectionByNode(node *components.TreeNode) *api.CollectionFile
FindCollectionByNode finds the collection that contains a tree node
func (*CollectionsView) GetClipboard ¶
func (c *CollectionsView) GetClipboard() *components.TreeNode
GetClipboard returns the clipboard node
func (*CollectionsView) GetCollections ¶
func (c *CollectionsView) GetCollections() []*api.CollectionFile
GetCollections returns the loaded collections
func (*CollectionsView) GetCollectionsPath ¶
func (c *CollectionsView) GetCollectionsPath() string
GetCollectionsPath returns the path to collections directory
func (*CollectionsView) GetFolderPath ¶
func (c *CollectionsView) GetFolderPath(node *components.TreeNode) []string
GetFolderPath returns the folder path from a node to its collection
func (*CollectionsView) GetFolderPathIncluding ¶
func (c *CollectionsView) GetFolderPathIncluding(node *components.TreeNode) []string
GetFolderPathIncluding returns the folder path including the node itself
func (*CollectionsView) GetJumpTargets ¶ added in v1.1.0
func (c *CollectionsView) GetJumpTargets(startRow, startCol int) []JumpTarget
GetJumpTargets returns jump targets for visible items in the tree viewport. startRow and startCol define the offset for label positioning in the panel. Only items within the visible viewport height are included as targets.
func (CollectionsView) GetTree ¶
func (c CollectionsView) GetTree() *components.Tree
GetTree returns the tree component for external access
func (*CollectionsView) PasteNode ¶
func (c *CollectionsView) PasteNode(clipboard *components.TreeNode, target *components.TreeNode) error
PasteNode pastes clipboard content to target location Target logic: - If target is a folder/collection: paste inside it - If target is a request: paste in same folder as the request
func (*CollectionsView) ReloadCollections ¶
func (c *CollectionsView) ReloadCollections()
ReloadCollections reloads collections from disk while preserving tree state
func (*CollectionsView) RenameNode ¶
func (c *CollectionsView) RenameNode(node *components.TreeNode, newName string) error
RenameNode renames a tree node (request or folder)
func (*CollectionsView) SelectIndex ¶ added in v1.1.0
func (c *CollectionsView) SelectIndex(index int)
SelectIndex selects an item by its visual index in the tree
func (CollectionsView) Selected ¶
func (c CollectionsView) Selected() *components.TreeNode
Selected returns the currently selected tree node
func (*CollectionsView) SetClipboard ¶
func (c *CollectionsView) SetClipboard(node *components.TreeNode)
SetClipboard sets the clipboard node for copy/paste
func (CollectionsView) Update ¶
func (c CollectionsView) Update(msg tea.Msg, cfg *config.GlobalConfig) (CollectionsView, tea.Cmd)
Update handles messages for the collections view
func (*CollectionsView) UpdateRequest ¶
func (c *CollectionsView) UpdateRequest(node *components.TreeNode, name, method, url string) error
UpdateRequest updates a request node's name, method, and URL
func (*CollectionsView) UpdateRequestAuthByID ¶
func (c *CollectionsView) UpdateRequestAuthByID(requestID string, auth *api.AuthConfig) error
UpdateRequestAuthByID finds a request by ID across all collections and updates its auth
func (*CollectionsView) UpdateRequestBodyByID ¶
func (c *CollectionsView) UpdateRequestBodyByID(requestID, bodyType, content string) error
UpdateRequestBodyByID finds a request by ID across all collections and updates its body
func (*CollectionsView) UpdateRequestScriptsByID ¶
func (c *CollectionsView) UpdateRequestScriptsByID(requestID, preRequest, postRequest string) error
UpdateRequestScriptsByID finds a request by ID across all collections and updates its scripts
func (*CollectionsView) UpdateRequestURLByID ¶
func (c *CollectionsView) UpdateRequestURLByID(requestID, newURL string) error
UpdateRequestURLByID finds a request by ID across all collections and updates its URL
type CommandExecuteMsg ¶
type CommandExecuteMsg struct {
Command string // The command name
Args []string // Command arguments
Raw string // Raw input string
}
CommandExecuteMsg is sent when a command is submitted
type CommandInput ¶
type CommandInput struct {
// contains filtered or unexported fields
}
CommandInput handles command mode text input with history
func NewCommandInput ¶
func NewCommandInput() *CommandInput
NewCommandInput creates a new command input
func (*CommandInput) GetInput ¶
func (c *CommandInput) GetInput() string
GetInput returns the current input text
func (*CommandInput) IsVisible ¶
func (c *CommandInput) IsVisible() bool
IsVisible returns whether the command input is visible
func (*CommandInput) Show ¶
func (c *CommandInput) Show()
Show makes the command input visible and resets state
func (*CommandInput) Update ¶
func (c *CommandInput) Update(msg tea.Msg) (*CommandInput, tea.Cmd)
Update handles messages for the command input
func (*CommandInput) View ¶
func (c *CommandInput) View(width int) string
View renders the command input
type ConsoleStatusMsg ¶
type ConsoleStatusMsg struct {
Message string
Type StatusType
Duration time.Duration // How long to show (default 2s)
}
ConsoleStatusMsg displays a temporary status in the console
type ConsoleView ¶
type ConsoleView struct {
// contains filtered or unexported fields
}
ConsoleView renders the console history list within ResponseView
func (*ConsoleView) GetSelectedEntry ¶
func (c *ConsoleView) GetSelectedEntry(history *api.ConsoleHistory) *api.ConsoleEntry
GetSelectedEntry returns the currently selected entry
func (*ConsoleView) IsExpanded ¶
func (c *ConsoleView) IsExpanded() bool
IsExpanded returns true if viewing entry details
func (*ConsoleView) SetDimensions ¶
func (c *ConsoleView) SetDimensions(width, height int)
SetDimensions updates the view dimensions
func (ConsoleView) Update ¶
func (c ConsoleView) Update(msg tea.Msg, history *api.ConsoleHistory, cfg *config.GlobalConfig) (ConsoleView, tea.Cmd)
Update handles keyboard input for the console view
func (ConsoleView) View ¶
func (c ConsoleView) View(width, height int, history *api.ConsoleHistory, active bool) string
View renders the console content
type CopyToClipboardMsg ¶
type CopyToClipboardMsg struct {
Content string // Text to copy
Label string // What was copied (for status message)
}
CopyToClipboardMsg signals content should be copied to clipboard
type CurlExportedMsg ¶ added in v1.1.0
CurlExportedMsg is sent when a request is exported to clipboard
type CurlImportedMsg ¶ added in v1.1.0
type CurlImportedMsg struct {
Request *api.CollectionRequest
}
CurlImportedMsg is sent when a cURL command is successfully imported
type EnvClipboard ¶
type EnvClipboard struct {
Type EnvNodeType
Name string
EnvFile *api.EnvironmentFile // For EnvNode
VarData *api.EnvironmentVariable // For VarNode
}
EnvClipboard holds copied environment data
type EnvNodeType ¶
type EnvNodeType int
EnvNodeType represents the type of environment tree node
const ( EnvNode EnvNodeType = iota VarNode )
type EnvTreeNode ¶
type EnvTreeNode struct {
Name string
Type EnvNodeType
Variable *api.EnvironmentVariable // For VarNode
Expanded bool // Only for EnvNode
Children []*EnvTreeNode
Parent *EnvTreeNode
EnvFile *api.EnvironmentFile // Reference to source environment
}
EnvTreeNode represents a node in the environment tree
type EnvironmentsView ¶
type EnvironmentsView struct {
// contains filtered or unexported fields
}
EnvironmentsView represents the environments panel
func NewEnvironmentsView ¶
func NewEnvironmentsView(workspacePath string) *EnvironmentsView
NewEnvironmentsView creates a new environments view
func (*EnvironmentsView) GetActiveEnvironment ¶
func (e *EnvironmentsView) GetActiveEnvironment() *api.EnvironmentFile
GetActiveEnvironment returns the currently active environment
func (*EnvironmentsView) GetActiveEnvironmentName ¶
func (e *EnvironmentsView) GetActiveEnvironmentName() string
GetActiveEnvironmentName returns the name of the active environment
func (*EnvironmentsView) GetActiveEnvironmentVariables ¶
func (e *EnvironmentsView) GetActiveEnvironmentVariables() map[string]string
GetActiveEnvironmentVariables returns the variables of the active environment
func (*EnvironmentsView) GetBreadcrumb ¶
func (e *EnvironmentsView) GetBreadcrumb() []string
GetBreadcrumb returns the breadcrumb path for the current cursor position
func (*EnvironmentsView) HasActiveModal ¶
func (e *EnvironmentsView) HasActiveModal() bool
HasActiveModal returns true if any modal is visible
func (*EnvironmentsView) HasSearchQuery ¶
func (e *EnvironmentsView) HasSearchQuery() bool
HasSearchQuery returns true if there's an active search query (not input visible)
func (*EnvironmentsView) IsSearching ¶
func (e *EnvironmentsView) IsSearching() bool
IsSearching returns true if search is active
func (*EnvironmentsView) ReloadEnvironments ¶
func (e *EnvironmentsView) ReloadEnvironments()
ReloadEnvironments reloads environments from disk
func (*EnvironmentsView) RenderModal ¶
func (e *EnvironmentsView) RenderModal(screenWidth, screenHeight int) string
RenderModal renders any active modal
func (*EnvironmentsView) SaveActiveEnvironment ¶ added in v1.3.0
func (e *EnvironmentsView) SaveActiveEnvironment() error
SaveActiveEnvironment saves the active environment to disk
func (*EnvironmentsView) SetActiveEnvironmentName ¶
func (e *EnvironmentsView) SetActiveEnvironmentName(name string)
SetActiveEnvironmentName sets the active environment by name
func (EnvironmentsView) Update ¶
func (e EnvironmentsView) Update(msg tea.Msg, cfg *config.GlobalConfig) (EnvironmentsView, tea.Cmd)
Update handles messages for the environments view
type HTTPResponseMsg ¶
HTTPResponseMsg is sent when an HTTP request completes
type HTTPSendingMsg ¶
type HTTPSendingMsg struct{}
HTTPSendingMsg is sent when an HTTP request starts
type HideImportModalMsg ¶ added in v1.1.0
type HideImportModalMsg struct{}
HideImportModalMsg triggers the import modal to close
type HideOpenAPIImportModalMsg ¶ added in v1.2.0
type HideOpenAPIImportModalMsg struct{}
HideOpenAPIImportModalMsg triggers the OpenAPI import modal to close
type ImportModalModel ¶ added in v1.1.0
type ImportModalModel struct {
// contains filtered or unexported fields
}
ImportModalModel handles the cURL import modal
func NewImportModal ¶ added in v1.1.0
func NewImportModal() *ImportModalModel
NewImportModal creates a new import modal
func (*ImportModalModel) ClearError ¶ added in v1.1.0
func (m *ImportModalModel) ClearError()
ClearError clears the error message
func (*ImportModalModel) GetValue ¶ added in v1.1.0
func (m *ImportModalModel) GetValue() string
GetValue returns the current textarea value
func (*ImportModalModel) Hide ¶ added in v1.1.0
func (m *ImportModalModel) Hide()
Hide hides the modal
func (*ImportModalModel) IsVisible ¶ added in v1.1.0
func (m *ImportModalModel) IsVisible() bool
IsVisible returns whether the modal is visible
func (*ImportModalModel) SetError ¶ added in v1.1.0
func (m *ImportModalModel) SetError(err string)
SetError sets an error message to display
func (*ImportModalModel) SetSize ¶ added in v1.1.0
func (m *ImportModalModel) SetSize(width, height int)
SetSize updates the modal dimensions
func (*ImportModalModel) Show ¶ added in v1.1.0
func (m *ImportModalModel) Show()
Show makes the modal visible and focuses the textarea
func (*ImportModalModel) Update ¶ added in v1.1.0
func (m *ImportModalModel) Update(msg tea.Msg) (*ImportModalModel, tea.Cmd)
Update handles messages for the import modal
func (*ImportModalModel) View ¶ added in v1.1.0
func (m *ImportModalModel) View() string
View renders the import modal
type JumpAction ¶ added in v1.1.0
type JumpAction int
JumpAction defines what happens when jumping to a target
const ( JumpFocus JumpAction = iota // Focus the element (inputs, URL field) JumpSelect // Select in list (tree items, rows) JumpActivate // Trigger action (tabs, buttons) )
func (JumpAction) String ¶ added in v1.1.0
func (a JumpAction) String() string
String returns the display name for the action
type JumpModeState ¶ added in v1.1.0
type JumpModeState struct {
// State
Active bool // Whether jump mode is currently active
AllPanels bool // true = cross-panel mode (F), false = single panel (f)
// Target management
Targets []JumpTarget // All available jump targets with assigned labels
ScopePanel PanelType // Active panel when jump mode started
// Input handling
Filter string // Current typed filter for multi-key mode
MatchingCount int // Number of targets matching current filter
// Memory
LastJumpLabel string // Last successful jump for repeat navigation
}
JumpModeState manages the jump navigation state machine
func NewJumpMode ¶ added in v1.1.0
func NewJumpMode() *JumpModeState
NewJumpMode creates a new JumpModeState with default values
func (*JumpModeState) Activate ¶ added in v1.1.0
func (m *JumpModeState) Activate(currentPanel PanelType)
Activate starts jump mode for a single panel. Collects targets from the specified panel only.
func (*JumpModeState) ActivateAllPanels ¶ added in v1.1.0
func (m *JumpModeState) ActivateAllPanels()
ActivateAllPanels starts jump mode for all panels. Collects targets from Collections, Request, and Response panels.
func (*JumpModeState) AssignLabels ¶ added in v1.1.0
func (m *JumpModeState) AssignLabels(targets []JumpTarget)
AssignLabels assigns unique labels to a list of targets using home-row priority
Algorithm:
- If ≤26 targets: Use single letters (a, s, d, f, j, k, l, g, h, ...)
- If >26 targets: Use ALL two-letter combinations (aa, as, ad, ..., sa, ss, ...) This ensures the first keypress only filters, never jumps.
The targets slice is modified in place with Label field populated.
func (*JumpModeState) CycleScopePanel ¶ added in v1.1.0
func (m *JumpModeState) CycleScopePanel() PanelType
CycleScopePanel cycles to the next panel scope. Only works when not in all-panels mode. Returns the new scope panel.
func (*JumpModeState) Deactivate ¶ added in v1.1.0
func (m *JumpModeState) Deactivate()
Deactivate exits jump mode without performing a jump.
func (*JumpModeState) GetFilter ¶ added in v1.1.0
func (m *JumpModeState) GetFilter() string
GetFilter returns the current typed filter string.
func (*JumpModeState) GetScopePanel ¶ added in v1.1.0
func (m *JumpModeState) GetScopePanel() PanelType
GetScopePanel returns the current scope panel.
func (*JumpModeState) GetVisibleTargets ¶ added in v1.1.0
func (m *JumpModeState) GetVisibleTargets() []JumpTarget
GetVisibleTargets returns targets that match the current filter and panel scope. Used for rendering - only visible targets should display labels.
func (*JumpModeState) HandleKey ¶ added in v1.1.0
func (m *JumpModeState) HandleKey(key string) (target *JumpTarget, shouldCancel bool)
HandleKey processes a key press during jump mode. Returns:
- target: The matched target if a complete match is found, nil otherwise
- shouldCancel: true if mode should be canceled (invalid key or escape)
func (*JumpModeState) IsActive ¶ added in v1.1.0
func (m *JumpModeState) IsActive() bool
IsActive returns whether jump mode is currently active.
func (*JumpModeState) IsAllPanels ¶ added in v1.1.0
func (m *JumpModeState) IsAllPanels() bool
IsAllPanels returns whether jump mode is targeting all panels.
func (*JumpModeState) RenderOverlay ¶ added in v1.1.0
func (m *JumpModeState) RenderOverlay(baseView string, width, height int) string
RenderOverlay overlays jump labels onto the base view. It places styled labels at the Row/Col positions of visible targets.
Parameters:
- baseView: The fully rendered view string to overlay labels on
- width: Total width of the view
- height: Total height of the view
Returns the view with jump labels overlaid.
func (*JumpModeState) SetTargets ¶ added in v1.1.0
func (m *JumpModeState) SetTargets(targets []JumpTarget)
SetTargets sets the jump targets and assigns labels to them.
type JumpTarget ¶ added in v1.1.0
type JumpTarget struct {
// Label assignment
Label string // Assigned label: "a", "b", ..., "aa", "ab", ...
// Location
Panel PanelType // Which panel (CollectionsPanel, RequestPanel, ResponsePanel)
Row int // Screen row for label placement (0-indexed from panel start)
Col int // Screen column for label placement
// Target identification
Index int // Index within panel's item list
ElementID string // Optional unique ID (e.g., request ID, tab name)
// Action on jump
Action JumpAction // What happens when this target is jumped to
}
JumpTarget represents an element that can be jumped to
type KeyValueClipboard ¶
KeyValueClipboard holds copied key-value data
type LayoutMode ¶
type LayoutMode int
LayoutMode represents the panel arrangement mode
const ( // VerticalLayout is the default 3-panel Lazygit-style layout (side-by-side) VerticalLayout LayoutMode = iota // HorizontalLayout stacks panels vertically for small terminals HorizontalLayout )
type LeftPanel ¶
type LeftPanel struct {
// contains filtered or unexported fields
}
LeftPanel wraps Collections and Environments views with tabs
func NewLeftPanel ¶
NewLeftPanel creates a new left panel
func (*LeftPanel) GetActiveTab ¶
func (l *LeftPanel) GetActiveTab() LeftPanelTab
GetActiveTab returns the currently active tab
func (*LeftPanel) GetCollections ¶
func (l *LeftPanel) GetCollections() *CollectionsView
GetCollections returns the collections view
func (*LeftPanel) GetEnvironments ¶
func (l *LeftPanel) GetEnvironments() *EnvironmentsView
GetEnvironments returns the environments view
func (*LeftPanel) GetJumpTargets ¶ added in v1.1.0
func (l *LeftPanel) GetJumpTargets(startRow, startCol int) []JumpTarget
GetJumpTargets returns jump targets for the left panel. Delegates to Collections or Environments based on active tab.
func (*LeftPanel) GetSessionState ¶
func (l *LeftPanel) GetSessionState() session.CollectionsPanelState
GetSessionState returns the current session state for the left panel
func (*LeftPanel) HasSearchQuery ¶
HasSearchQuery returns true if the active tab has an active search query (not input)
func (*LeftPanel) IsSearching ¶
IsSearching returns true if the active tab has search input visible
func (LeftPanel) RenderTabs ¶
RenderTabs renders the tab bar for the panel title
func (*LeftPanel) SetActiveTab ¶
func (l *LeftPanel) SetActiveTab(tab LeftPanelTab)
SetActiveTab sets the active tab
func (*LeftPanel) SetSessionState ¶
func (l *LeftPanel) SetSessionState(state session.CollectionsPanelState)
SetSessionState applies session state to the left panel
type LeftPanelTab ¶
type LeftPanelTab int
LeftPanelTab represents the active tab in the left panel
const ( CollectionsTab LeftPanelTab = iota EnvironmentsTab )
type Mode ¶
type Mode int
Mode represents the current interaction context for the TUI
func (Mode) AllowsInput ¶
AllowsInput returns true if mode accepts text input
func (Mode) AllowsNavigation ¶
AllowsNavigation returns true if mode allows panel navigation
type ModeChangeMsg ¶
ModeChangeMsg signals a mode transition
func NewModeChangeMsg ¶
func NewModeChangeMsg(from, to Mode) ModeChangeMsg
NewModeChangeMsg creates a mode change message
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents the main application model
func NewModel ¶
func NewModel(globalConfig *config.GlobalConfig, workspaceConfig *config.WorkspaceConfig, workspacePath string) Model
NewModel creates a new application model
func (*Model) GetWhichKeyHints ¶
GetWhichKeyHints returns the current WhichKey hints for the statusbar
type OpenAPIImportCompleteMsg ¶ added in v1.2.0
type OpenAPIImportCompleteMsg struct {
Collection *api.CollectionFile
Error error
SavePath string
}
OpenAPIImportCompleteMsg is sent when async import completes
type OpenAPIImportModal ¶ added in v1.2.0
type OpenAPIImportModal struct {
// contains filtered or unexported fields
}
OpenAPIImportModal handles the OpenAPI import modal
func NewOpenAPIImportModal ¶ added in v1.2.0
func NewOpenAPIImportModal(collectionsDir string) *OpenAPIImportModal
NewOpenAPIImportModal creates a new OpenAPI import modal
func (*OpenAPIImportModal) GetFilePath ¶ added in v1.2.0
func (m *OpenAPIImportModal) GetFilePath() string
GetFilePath returns the current file path
func (*OpenAPIImportModal) Hide ¶ added in v1.2.0
func (m *OpenAPIImportModal) Hide()
Hide hides the modal
func (*OpenAPIImportModal) IsVisible ¶ added in v1.2.0
func (m *OpenAPIImportModal) IsVisible() bool
IsVisible returns whether the modal is visible
func (*OpenAPIImportModal) SetError ¶ added in v1.2.0
func (m *OpenAPIImportModal) SetError(err string)
SetError sets an error message
func (*OpenAPIImportModal) SetSize ¶ added in v1.2.0
func (m *OpenAPIImportModal) SetSize(width, height int)
SetSize updates the modal dimensions
func (*OpenAPIImportModal) Show ¶ added in v1.2.0
func (m *OpenAPIImportModal) Show()
Show makes the modal visible and focuses the input
func (*OpenAPIImportModal) Update ¶ added in v1.2.0
func (m *OpenAPIImportModal) Update(msg tea.Msg) (*OpenAPIImportModal, tea.Cmd)
Update handles messages for the OpenAPI import modal
func (*OpenAPIImportModal) View ¶ added in v1.2.0
func (m *OpenAPIImportModal) View() string
View renders the OpenAPI import modal
type OpenAPIImportState ¶ added in v1.2.0
type OpenAPIImportState int
OpenAPIImportState represents the current state of the import modal
const ( StateInputPath OpenAPIImportState = iota // Waiting for file path input StatePreview // Showing import preview StateConfirmOverwrite // Asking to confirm overwrite StateImporting // Importing in progress StateError // Error occurred )
Import modal states
type OpenAPIImportStats ¶ added in v1.2.0
OpenAPIImportStats contains import statistics
type OpenAPIImportedMsg ¶ added in v1.2.0
type OpenAPIImportedMsg struct {
Collection *api.CollectionFile
Stats OpenAPIImportStats
}
OpenAPIImportedMsg is sent when an OpenAPI spec is successfully imported
type OpenAPISpinnerTickMsg ¶ added in v1.2.0
type OpenAPISpinnerTickMsg struct{}
OpenAPISpinnerTickMsg is sent to animate the import spinner
type ParamsSection ¶
type ParamsSection int
ParamsSection represents which section is active in Params tab
const ( PathParamsSection ParamsSection = iota QueryParamsSection )
type PostResponseScriptResultMsg ¶ added in v1.3.0
type PostResponseScriptResultMsg struct {
Result *api.ScriptResult
Error error
}
PostResponseScriptResultMsg is sent when post-response script execution completes
type PostmanExportedMsg ¶ added in v1.2.0
PostmanExportedMsg is sent when a collection/environment is exported
type PostmanImportErrorMsg ¶ added in v1.2.0
type PostmanImportErrorMsg struct {
Error error
}
PostmanImportErrorMsg is sent when Postman import fails
type PostmanImportedMsg ¶ added in v1.2.0
type PostmanImportedMsg struct {
Collection *api.CollectionFile
Environment *api.EnvironmentFile
Summary string
IsEnv bool
}
PostmanImportedMsg is sent when a Postman file is successfully imported
type PreRequestScriptResultMsg ¶ added in v1.3.0
type PreRequestScriptResultMsg struct {
Result *api.ScriptResult
ModifiedReq *api.ScriptRequest
Error error
OriginalReq *api.Request
PreRequestBody string // Original body before script modification
}
PreRequestScriptResultMsg is sent when pre-request script execution completes
type RequestAuthChangedMsg ¶
type RequestAuthChangedMsg struct {
Auth *api.AuthConfig
}
RequestAuthChangedMsg is sent when auth configuration is modified
type RequestBodyChangedMsg ¶
RequestBodyChangedMsg is sent when body content is modified
type RequestDeleteMsg ¶
RequestDeleteMsg is sent when delete is requested
type RequestDuplicateMsg ¶
RequestDuplicateMsg is sent when duplicate is requested
type RequestEditMsg ¶
RequestEditMsg is sent when edit is requested
type RequestNewMsg ¶
type RequestNewMsg struct {
Tab string
}
RequestNewMsg is sent when new entry is requested
type RequestParamToggleMsg ¶
type RequestParamToggleMsg struct {
Tab string
}
RequestParamToggleMsg is sent when a param is toggled (enabled/disabled)
type RequestParamsChangedMsg ¶
type RequestParamsChangedMsg struct {
URL string
}
RequestParamsChangedMsg is sent when params are modified (to sync with URL)
type RequestPasteMsg ¶
type RequestPasteMsg struct {
Tab string
}
RequestPasteMsg is sent when paste is requested
type RequestRenameMsg ¶
type RequestRenameMsg struct {
Tab string // "Params" or "Headers"
Index int
Key string
Value string
}
RequestRenameMsg is sent when rename is requested
type RequestScriptsChangedMsg ¶
RequestScriptsChangedMsg is sent when scripts content is modified
type RequestURLChangedMsg ¶
type RequestURLChangedMsg struct {
URL string
}
RequestURLChangedMsg is sent when the URL is modified
type RequestView ¶
type RequestView struct {
// contains filtered or unexported fields
}
RequestView represents the request builder panel
func (*RequestView) AddPathParamToURL ¶
func (r *RequestView) AddPathParamToURL(paramName string)
AddPathParamToURL adds a new path param placeholder to the URL
func (*RequestView) AddRow ¶
func (r *RequestView) AddRow(key, value string)
AddRow adds a row to the current table
func (*RequestView) BuildURLFromParams ¶
func (r *RequestView) BuildURLFromParams() string
BuildURLFromParams reconstructs the URL with current query params
func (*RequestView) BuildURLWithPathParams ¶
func (r *RequestView) BuildURLWithPathParams() string
BuildURLWithPathParams returns the URL with path params substituted with their values This is used when sending requests
func (*RequestView) DeleteRow ¶
func (r *RequestView) DeleteRow(index int)
DeleteRow deletes a row from the current table
func (*RequestView) DuplicateRow ¶
func (r *RequestView) DuplicateRow(index int)
DuplicateRow duplicates a row
func (*RequestView) ExtractPathParamsFromURL ¶
func (r *RequestView) ExtractPathParamsFromURL() []string
ExtractPathParamsFromURL finds all :param patterns in the URL
func (*RequestView) ExtractVariablesFromURL ¶
func (r *RequestView) ExtractVariablesFromURL() []string
ExtractVariablesFromURL finds all {{variable}} patterns in the URL
func (*RequestView) GetActiveScriptsEditor ¶
func (r *RequestView) GetActiveScriptsEditor() *components.Editor
GetActiveScriptsEditor returns the currently active scripts editor
func (*RequestView) GetActiveTab ¶
func (r *RequestView) GetActiveTab() string
GetActiveTab returns the active tab name
func (*RequestView) GetAuthConfig ¶
func (r *RequestView) GetAuthConfig() *api.AuthConfig
GetAuthConfig returns the current auth configuration
func (*RequestView) GetBodyContent ¶
func (r *RequestView) GetBodyContent() string
GetBodyContent returns the body content from the body editor
func (*RequestView) GetClipboard ¶
func (r *RequestView) GetClipboard() *KeyValueClipboard
GetClipboard returns the clipboard
func (*RequestView) GetCurrentRequestID ¶
func (r *RequestView) GetCurrentRequestID() string
GetCurrentRequestID returns the ID of the currently loaded request
func (*RequestView) GetHeadersTable ¶
func (r *RequestView) GetHeadersTable() *components.Table
GetHeadersTable returns the headers table for HTTP request building
func (*RequestView) GetJumpTargets ¶ added in v1.1.0
func (r *RequestView) GetJumpTargets(startRow, startCol int) []JumpTarget
GetJumpTargets returns jump targets for the request view. Includes tabs and URL field.
func (*RequestView) GetMethod ¶
func (r *RequestView) GetMethod() string
GetMethod returns the current HTTP method
func (*RequestView) GetParamsSection ¶
func (r *RequestView) GetParamsSection() ParamsSection
GetParamsSection returns the current params section
func (*RequestView) GetPathParamsTable ¶
func (r *RequestView) GetPathParamsTable() *components.Table
GetPathParamsTable returns the path params table for external access
func (*RequestView) GetPostRequestScript ¶ added in v1.3.0
func (r *RequestView) GetPostRequestScript() string
GetPostRequestScript returns the post-request script content
func (*RequestView) GetPreRequestScript ¶ added in v1.3.0
func (r *RequestView) GetPreRequestScript() string
GetPreRequestScript returns the pre-request script content
func (*RequestView) GetSessionState ¶
func (r *RequestView) GetSessionState() session.RequestPanelState
GetSessionState returns the current session state for the request panel
func (*RequestView) GetTitle ¶
func (r *RequestView) GetTitle() string
GetTitle returns a formatted title for the panel header
func (*RequestView) IsAuthEditing ¶
func (r *RequestView) IsAuthEditing() bool
IsAuthEditing returns true if editing a field in Authorization tab
func (*RequestView) IsBodyPreviewMode ¶
func (r *RequestView) IsBodyPreviewMode() bool
IsBodyPreviewMode returns true if the body editor is in preview mode
func (*RequestView) IsEditingURL ¶
func (r *RequestView) IsEditingURL() bool
IsEditingURL returns whether the URL input is being edited
func (*RequestView) IsEditorActive ¶
func (r *RequestView) IsEditorActive() bool
IsEditorActive returns true if an editor tab (Body or Scripts) is active
func (*RequestView) IsEditorInInsertMode ¶
func (r *RequestView) IsEditorInInsertMode() bool
IsEditorInInsertMode returns true if the body editor is in INSERT mode
func (*RequestView) IsScriptsEditorInInsertMode ¶
func (r *RequestView) IsScriptsEditorInInsertMode() bool
IsScriptsEditorInInsertMode returns true if the active scripts editor is in INSERT mode
func (*RequestView) JumpTo ¶ added in v1.1.0
func (r *RequestView) JumpTo(elementID string)
JumpTo jumps to a specific element by its ID (tab name, field, etc.)
func (*RequestView) LoadCollectionRequest ¶
func (r *RequestView) LoadCollectionRequest(req *api.CollectionRequest)
LoadCollectionRequest loads a full CollectionRequest with all its data
func (*RequestView) LoadRequest ¶
func (r *RequestView) LoadRequest(id, name, method, url string)
LoadRequest loads a request from the tree selection
func (*RequestView) ParsePathParams ¶
func (r *RequestView) ParsePathParams()
ParsePathParams extracts path parameters (:param) from the URL and adds them to the pathParams table
func (*RequestView) ParseURLParams ¶
func (r *RequestView) ParseURLParams()
ParseURLParams extracts query parameters from the URL and adds them to the params table
func (*RequestView) RenameRow ¶
func (r *RequestView) RenameRow(index int, newKey string)
RenameRow renames only the key of a row
func (*RequestView) SetClipboard ¶
func (r *RequestView) SetClipboard(key, value string)
SetClipboard sets the clipboard
func (*RequestView) SetEditingURL ¶
func (r *RequestView) SetEditingURL(editing bool)
SetEditingURL sets the URL editing state
func (*RequestView) SetEnvironmentVariables ¶
func (r *RequestView) SetEnvironmentVariables(vars map[string]string)
SetEnvironmentVariables sets the environment variables for body preview mode Uses content-based comparison to avoid redundant updates on every render
func (*RequestView) SetSessionState ¶
func (r *RequestView) SetSessionState(state session.RequestPanelState)
SetSessionState applies session state to the request panel
func (*RequestView) SetURL ¶
func (r *RequestView) SetURL(url string)
SetURL sets the URL without clearing params or headers
func (*RequestView) SyncURLFromParams ¶
func (r *RequestView) SyncURLFromParams() string
SyncURLFromParams updates the internal URL from the params table and returns the new URL
func (RequestView) Update ¶
func (r RequestView) Update(msg tea.Msg, cfg *config.GlobalConfig) (RequestView, tea.Cmd)
Update handles messages for the request view
func (*RequestView) UpdateRow ¶
func (r *RequestView) UpdateRow(index int, key, value string)
UpdateRow updates a row in the current table
type RequestYankMsg ¶
RequestYankMsg is sent when yank is requested
type ResendRequestMsg ¶
ResendRequestMsg signals that a request should be resent
type ResponseView ¶
type ResponseView struct {
// contains filtered or unexported fields
}
ResponseView represents the response viewer panel
func NewResponseView ¶
func NewResponseView() *ResponseView
NewResponseView creates a new response view
func (*ResponseView) ClearResponse ¶
func (r *ResponseView) ClearResponse()
ClearResponse clears the response view
func (*ResponseView) ClearTestResults ¶ added in v1.3.0
func (r *ResponseView) ClearTestResults()
ClearTestResults clears the test results
func (*ResponseView) GetActiveTab ¶
func (r *ResponseView) GetActiveTab() string
GetActiveTab returns the currently active tab name
func (*ResponseView) GetJumpTargets ¶ added in v1.1.0
func (r *ResponseView) GetJumpTargets(startRow, startCol int) []JumpTarget
GetJumpTargets returns jump targets for the response view. Includes tabs (Body, Cookies, Headers, Tests, Console).
func (*ResponseView) GetResponseSize ¶
func (r *ResponseView) GetResponseSize() string
GetResponseSize returns the response size
func (*ResponseView) GetResponseTime ¶
func (r *ResponseView) GetResponseTime() string
GetResponseTime returns the response time
func (*ResponseView) GetSessionState ¶
func (r *ResponseView) GetSessionState() session.ResponsePanelState
GetSessionState returns the current session state for the response panel
func (*ResponseView) GetStatusCode ¶
func (r *ResponseView) GetStatusCode() int
GetStatusCode returns the current status code
func (*ResponseView) GetTestResults ¶ added in v1.3.0
func (r *ResponseView) GetTestResults() []api.AssertionResult
GetTestResults returns the current test results
func (*ResponseView) IsLoading ¶
func (r *ResponseView) IsLoading() bool
IsLoading returns whether a request is in progress
func (*ResponseView) JumpTo ¶ added in v1.1.0
func (r *ResponseView) JumpTo(elementID string)
JumpTo jumps to a specific element by its ID (tab name, field, etc.)
func (*ResponseView) SetLoading ¶
func (r *ResponseView) SetLoading(loading bool)
SetLoading sets the loading state
func (*ResponseView) SetResponse ¶
func (r *ResponseView) SetResponse(statusCode int, status string, headers map[string]string, cookies map[string]string, body string, time string, size string)
SetResponse updates the response view with new data
func (*ResponseView) SetSessionState ¶
func (r *ResponseView) SetSessionState(state session.ResponsePanelState)
SetSessionState applies session state to the response panel
func (*ResponseView) SetTestResults ¶ added in v1.3.0
func (r *ResponseView) SetTestResults(results []api.AssertionResult)
SetTestResults sets the test assertion results from script execution
func (*ResponseView) TickLoader ¶
func (r *ResponseView) TickLoader()
TickLoader advances the loader animation frame
func (ResponseView) Update ¶
func (r ResponseView) Update(msg tea.Msg, cfg *config.GlobalConfig) (ResponseView, tea.Cmd)
Update handles messages for the response view
func (ResponseView) UpdateWithHistory ¶
func (r ResponseView) UpdateWithHistory(msg tea.Msg, cfg *config.GlobalConfig, history *api.ConsoleHistory) (ResponseView, tea.Cmd)
UpdateWithHistory handles messages for the response view with console history
func (ResponseView) View ¶
func (r ResponseView) View(width, height int, active bool) string
View renders the response view
func (ResponseView) ViewWithHistory ¶
func (r ResponseView) ViewWithHistory(width, height int, active bool, history *api.ConsoleHistory) string
ViewWithHistory renders the response view with console history support
type ScriptAssertionResultsMsg ¶ added in v1.3.0
type ScriptAssertionResultsMsg struct {
Assertions []api.AssertionResult // Test assertion results
AllPassed bool // True if all assertions passed
PassCount int // Number of passed assertions
FailCount int // Number of failed assertions
}
ScriptAssertionResultsMsg notifies UI of assertion results
type ScriptConsoleFormatter ¶ added in v1.3.0
type ScriptConsoleFormatter struct{}
ScriptConsoleFormatter formats script console output for display
func NewScriptConsoleFormatter ¶ added in v1.3.0
func NewScriptConsoleFormatter() *ScriptConsoleFormatter
NewScriptConsoleFormatter creates a new formatter
func (*ScriptConsoleFormatter) FormatAssertionResults ¶ added in v1.3.0
func (f *ScriptConsoleFormatter) FormatAssertionResults(results []api.AssertionResult, width int) string
FormatAssertionResults formats assertion results for display
func (*ScriptConsoleFormatter) FormatEntries ¶ added in v1.3.0
func (f *ScriptConsoleFormatter) FormatEntries(entries []api.ConsoleLogEntry, width, maxLines int) string
FormatEntries formats multiple console entries
func (*ScriptConsoleFormatter) FormatEntry ¶ added in v1.3.0
func (f *ScriptConsoleFormatter) FormatEntry(entry api.ConsoleLogEntry, width int) string
FormatEntry formats a single console log entry for display
func (*ScriptConsoleFormatter) FormatEnvChanges ¶ added in v1.3.0
func (f *ScriptConsoleFormatter) FormatEnvChanges(changes []api.EnvChange, width int) string
FormatEnvChanges formats environment variable changes for display
func (*ScriptConsoleFormatter) FormatHeader ¶ added in v1.3.0
func (f *ScriptConsoleFormatter) FormatHeader(scriptType ScriptType, width int) string
FormatHeader returns a styled header for script console section
func (*ScriptConsoleFormatter) FormatScriptError ¶ added in v1.3.0
func (f *ScriptConsoleFormatter) FormatScriptError(err *api.ScriptErrorInfo, width int) string
FormatScriptError formats a script error for display
type ScriptConsoleOutputMsg ¶ added in v1.3.0
type ScriptConsoleOutputMsg struct {
Entries []api.ConsoleLogEntry // Console log entries from script
Type ScriptType // Which script produced this output
}
ScriptConsoleOutputMsg notifies UI of new console output
type ScriptEnvChangesMsg ¶ added in v1.3.0
type ScriptEnvChangesMsg struct {
Changes []api.EnvChange // Environment variable changes
Applied bool // True if changes were applied
}
ScriptEnvChangesMsg notifies UI of environment variable changes
type ScriptErrorDisplayMsg ¶ added in v1.3.0
type ScriptErrorDisplayMsg struct {
Error *api.ScriptErrorInfo // Error details
Type ScriptType // Which script failed
Context string // Additional context (e.g., "line 5")
}
ScriptErrorDisplayMsg requests error display in UI
type ScriptExecutionRequestMsg ¶ added in v1.3.0
type ScriptExecutionRequestMsg struct {
Type ScriptType // When this script runs
Script string // JavaScript code to execute
Request *api.ScriptRequest // Request data (always provided)
Response *api.ScriptResponse // Response data (only for post-response)
Env *api.Environment // Environment for variable access
}
ScriptExecutionRequestMsg requests script execution
type ScriptExecutionResultMsg ¶ added in v1.3.0
type ScriptExecutionResultMsg struct {
Type ScriptType // Which script ran
Result *api.ScriptResult // Execution result
Request *api.ScriptRequest // Modified request (for pre-request scripts)
Error error // Execution error (if any)
}
ScriptExecutionResultMsg contains script execution results
type ScriptType ¶ added in v1.3.0
type ScriptType string
ScriptType indicates when a script runs
const ( ScriptTypePreRequest ScriptType = "pre-request" ScriptTypePostResponse ScriptType = "post-response" )
type ScriptsSection ¶
type ScriptsSection int
ScriptsSection represents which section is active in Scripts tab
const ( PreRequestSection ScriptsSection = iota PostRequestSection )
type SessionSaveTickMsg ¶
SessionSaveTickMsg is sent when the debounced save timer fires
type ShowImportModalMsg ¶ added in v1.1.0
type ShowImportModalMsg struct{}
ShowImportModalMsg triggers the import modal to open
type ShowOpenAPIImportModalMsg ¶ added in v1.2.0
type ShowOpenAPIImportModalMsg struct{}
ShowOpenAPIImportModalMsg triggers the OpenAPI import modal to open
type StatusBadge ¶
StatusBadge represents a styled HTTP status badge
func NewStatusBadge ¶
func NewStatusBadge(code int) StatusBadge
NewStatusBadge creates a status badge with appropriate colors
func (StatusBadge) Render ¶
func (s StatusBadge) Render() string
Render returns the styled status badge string
type StatusBar ¶
type StatusBar struct {
// contains filtered or unexported fields
}
StatusBar renders the bottom status bar with full context
func NewStatusBar ¶
NewStatusBar creates a new status bar
func (*StatusBar) ClearHTTPStatus ¶
func (s *StatusBar) ClearHTTPStatus()
ClearHTTPStatus clears the HTTP status display
func (*StatusBar) ClearMessage ¶
func (s *StatusBar) ClearMessage()
ClearMessage clears the status message
func (*StatusBar) SetBreadcrumb ¶
SetBreadcrumb sets the navigation breadcrumb
func (*StatusBar) SetEnvironment ¶
SetEnvironment sets the active environment name
func (*StatusBar) SetFullscreen ¶
SetFullscreen sets the fullscreen mode indicator
func (*StatusBar) SetHTTPStatus ¶
SetHTTPStatus sets the HTTP status display
func (*StatusBar) ShowMessage ¶
ShowMessage displays a temporary status message
type StatusType ¶
type StatusType int
StatusType represents the type of status message
const ( StatusInfo StatusType = iota StatusSuccess StatusError )
type StatusUpdateMsg ¶
type StatusUpdateMsg struct {
Mode *Mode
HTTPStatus *int
HTTPText *string
Method *string
Breadcrumb []string
Message *string
Duration time.Duration
}
StatusUpdateMsg signals a status bar update
type SwitchToConsoleTabMsg ¶
type SwitchToConsoleTabMsg struct{}
SwitchToConsoleTabMsg switches ResponseView to Console tab
type SwitchToResponseTabMsg ¶
type SwitchToResponseTabMsg struct{}
SwitchToResponseTabMsg switches ResponseView to Response (Body) tab