Documentation
¶
Index ¶
- Variables
- func ApplyFocus(style lipgloss.Style, focus bool) lipgloss.Style
- func DeleteRequestCmd(db *storage.SQLiteStorage, id int64) tea.Cmd
- func LoadRequestsCmd(db *storage.SQLiteStorage) tea.Cmd
- func SaveRequestCmd(db *storage.SQLiteStorage, request *http.Request) tea.Cmd
- func SetRequestPaneRequestCmd(request *http.Request) tea.Cmd
- func StartLoadTestCmd(config *http.JobConfig) tea.Cmd
- func WaitForLoadTestUpdatesCmd(updates <-chan *http.LoadTestStats, totalRequests int) tea.Cmd
- type FocusManager
- type Focusable
- type Header
- type MethodSelector
- type RequestDeletedMsg
- type RequestItem
- type RequestSavedMsg
- type RequestsLoadingMsg
- type SetRequestPaneRequestMsg
- type SidebarPane
- type SubmitButton
Constants ¶
This section is empty.
Variables ¶
View Source
var ( InactiveTab = lipgloss.NewStyle(). Padding(0, 1). Foreground(lipgloss.Color("240")) // dimGray ActiveTab = lipgloss.NewStyle(). Padding(0, 2). Background(lipgloss.Color("98")). Foreground(lipgloss.Color("255")). Bold(true) FocusedButton = lipgloss.NewStyle(). Foreground(lipgloss.Color("205")). Bold(true) UnfocusedButton = lipgloss.NewStyle(). Foreground(lipgloss.Color("240")) HelpStyle = lipgloss.NewStyle(). Margin(1, 2) HeaderStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). Height(2) // Header ASCII art styles HeaderLogoStyle = lipgloss.NewStyle(). Bold(true). Foreground(darkPurple) HeaderHelpStyle = lipgloss.NewStyle(). Foreground(dimGray) SidebarStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). Width(20) RequestStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()) ResponseStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()) LabelStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color("241")) LoadTestBorderStyle = lipgloss.NewStyle(). BorderStyle(lipgloss.RoundedBorder()). BorderForeground(lipgloss.Color("226")) // Yellow )
Functions ¶
func DeleteRequestCmd ¶
func DeleteRequestCmd(db *storage.SQLiteStorage, id int64) tea.Cmd
func LoadRequestsCmd ¶
func LoadRequestsCmd(db *storage.SQLiteStorage) tea.Cmd
func SaveRequestCmd ¶
func WaitForLoadTestUpdatesCmd ¶
func WaitForLoadTestUpdatesCmd(updates <-chan *http.LoadTestStats, totalRequests int) tea.Cmd
Types ¶
type FocusManager ¶
type FocusManager struct {
// contains filtered or unexported fields
}
func NewFocusManager ¶
func NewFocusManager(components []Focusable) *FocusManager
func NewFocusManagerWithIndex ¶
func NewFocusManagerWithIndex(components []Focusable, index int) *FocusManager
NewFocusManagerWithIndex creates a FocusManager starting at a specific index
func (*FocusManager) Current ¶
func (f *FocusManager) Current() Focusable
func (*FocusManager) CurrentIndex ¶
func (f *FocusManager) CurrentIndex() int
func (*FocusManager) Next ¶
func (f *FocusManager) Next()
func (*FocusManager) Prev ¶
func (f *FocusManager) Prev()
type Header ¶
type Header struct {
// contains filtered or unexported fields
}
func SetupHeader ¶
func SetupHeader() *Header
type MethodSelector ¶
type MethodSelector struct {
// contains filtered or unexported fields
}
func NewMethodSelector ¶
func NewMethodSelector() *MethodSelector
func (*MethodSelector) Blur ¶
func (m *MethodSelector) Blur()
func (*MethodSelector) Current ¶
func (m *MethodSelector) Current() string
func (*MethodSelector) Focus ¶
func (m *MethodSelector) Focus() tea.Cmd
func (*MethodSelector) GetStyle ¶
func (m *MethodSelector) GetStyle() lipgloss.Style
func (*MethodSelector) Next ¶
func (m *MethodSelector) Next()
func (*MethodSelector) Prev ¶
func (m *MethodSelector) Prev()
func (*MethodSelector) SetCurrentIndex ¶
func (m *MethodSelector) SetCurrentIndex(method string)
type RequestDeletedMsg ¶
type RequestItem ¶
func (RequestItem) Description ¶
func (i RequestItem) Description() string
func (RequestItem) FilterValue ¶
func (i RequestItem) FilterValue() string
func (RequestItem) Title ¶
func (i RequestItem) Title() string
type RequestSavedMsg ¶
type RequestsLoadingMsg ¶
type SidebarPane ¶
type SidebarPane struct {
// contains filtered or unexported fields
}
func NewSidebar ¶
func NewSidebar(db *storage.SQLiteStorage, keys keybindings.KeyMap) *SidebarPane
func (*SidebarPane) Init ¶
func (s *SidebarPane) Init() tea.Cmd
func (*SidebarPane) SelectedItem ¶
func (s *SidebarPane) SelectedItem() (RequestItem, bool)
func (*SidebarPane) SetRequests ¶
func (s *SidebarPane) SetRequests(items []list.Item)
func (*SidebarPane) SetSize ¶
func (s *SidebarPane) SetSize(width, height int)
func (*SidebarPane) View ¶
func (s *SidebarPane) View() string
type SubmitButton ¶
type SubmitButton struct {
// contains filtered or unexported fields
}
func NewSubmitButton ¶
func NewSubmitButton() *SubmitButton
func (*SubmitButton) Blur ¶
func (s *SubmitButton) Blur()
func (*SubmitButton) Focus ¶
func (s *SubmitButton) Focus() tea.Cmd
func (*SubmitButton) IsFocused ¶
func (s *SubmitButton) IsFocused() bool
Source Files
¶
Click to show internal directories.
Click to hide internal directories.