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 ResponsePane
- func (m *ResponsePane) ClearLoadTestStats()
- func (m ResponsePane) Init() tea.Cmd
- func (m *ResponsePane) SetHeight(height int)
- func (m *ResponsePane) SetLoadTestStats(stats *http.LoadTestStats)
- func (m *ResponsePane) SetResponse(response *http.Response)
- func (m *ResponsePane) SetWidth(width int)
- func (m *ResponsePane) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m ResponsePane) View() string
- type SetRequestPaneRequestMsg
- type SidebarPane
- type SubmitButton
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color("160")). Background(lipgloss.Color("52")) FocusedStyle = lipgloss.NewStyle().Foreground(focusColor) UnfocusedStyle = lipgloss.NewStyle().Foreground(unfocusColor) FocusedButton = lipgloss.NewStyle(). Foreground(lipgloss.Color("205")). Bold(true) UnfocusedButton = lipgloss.NewStyle(). Foreground(lipgloss.Color("240")) DocStyle = lipgloss.NewStyle().Margin(1, 2) // TODO: add parent base style 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 ResponsePane ¶
type ResponsePane struct {
Response *http.Response
LoadTestStats *http.LoadTestStats
// contains filtered or unexported fields
}
func SetupResponsePane ¶
func SetupResponsePane() ResponsePane
func (*ResponsePane) ClearLoadTestStats ¶
func (m *ResponsePane) ClearLoadTestStats()
func (ResponsePane) Init ¶
func (m ResponsePane) Init() tea.Cmd
func (*ResponsePane) SetHeight ¶
func (m *ResponsePane) SetHeight(height int)
func (*ResponsePane) SetLoadTestStats ¶
func (m *ResponsePane) SetLoadTestStats(stats *http.LoadTestStats)
func (*ResponsePane) SetResponse ¶
func (m *ResponsePane) SetResponse(response *http.Response)
func (*ResponsePane) SetWidth ¶
func (m *ResponsePane) SetWidth(width int)
func (ResponsePane) View ¶
func (m ResponsePane) View() string
type SidebarPane ¶
type SidebarPane struct {
// contains filtered or unexported fields
}
func NewSidebar ¶
func NewSidebar(db *storage.SQLiteStorage) *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.