Documentation
¶
Index ¶
- func AllThemeOptions() []themeOption
- func LoadUserThemes(dir string)
- func WriteExampleTheme(dir string)
- type DiffModel
- type EditorModel
- func (m EditorModel) Blur() EditorModel
- func (m EditorModel) BodyValue() string
- func (m EditorModel) BuildRequest() store.Request
- func (m EditorModel) Focus() EditorModel
- func (m EditorModel) IsEditingContent() bool
- func (m EditorModel) Load(r *store.Request, collID string) EditorModel
- func (m EditorModel) RefreshTheme() EditorModel
- func (m EditorModel) SetBody(s string) EditorModel
- func (m EditorModel) SetEnvVars(vars map[string]string) EditorModel
- func (m EditorModel) TestsScript() string
- func (m EditorModel) Update(msg tea.Msg) (EditorModel, tea.Cmd)
- func (m EditorModel) View() string
- type EnvEditorModel
- type HistoryModel
- type Model
- type PaletteModel
- type PluginManagerModel
- type ResponseModel
- func (m ResponseModel) AppendStreamLine(line string) ResponseModel
- func (m ResponseModel) Blur() ResponseModel
- func (m ResponseModel) FinalizeStream(elapsed time.Duration, body []byte, ct string) ResponseModel
- func (m ResponseModel) Focus() ResponseModel
- func (m ResponseModel) HasJSONTree() bool
- func (m ResponseModel) InTreeMode() bool
- func (m ResponseModel) InVisualMode() bool
- func (m ResponseModel) RefreshTheme() ResponseModel
- func (m ResponseModel) SetError(err error) ResponseModel
- func (m ResponseModel) SetLoading(v bool) ResponseModel
- func (m ResponseModel) SetResult(r *result) ResponseModel
- func (m ResponseModel) SetSize(w, h int) ResponseModel
- func (m ResponseModel) SetTestRows(rows []TestRow) ResponseModel
- func (m ResponseModel) SetTooLarge(r *result) ResponseModel
- func (m ResponseModel) Update(msg tea.Msg) (ResponseModel, tea.Cmd)
- func (m ResponseModel) View() string
- type RunnerModel
- type SettingsModel
- func (m SettingsModel) ExitThemeEditor() SettingsModel
- func (m SettingsModel) InThemeEditor() bool
- func (m SettingsModel) MaxDisplayBytesValue() int
- func (m SettingsModel) SelectedTheme() string
- func (m SettingsModel) TimeoutValue() int
- func (m SettingsModel) Update(msg tea.Msg) (SettingsModel, tea.Cmd)
- func (m SettingsModel) View() string
- type SidebarModel
- func (m SidebarModel) Blur() SidebarModel
- func (m SidebarModel) Collections() []*store.Collection
- func (m SidebarModel) Focus() SidebarModel
- func (m SidebarModel) InReqsMode() bool
- func (m SidebarModel) PendingDelete() bool
- func (m SidebarModel) Refresh(cols []*store.Collection) SidebarModel
- func (m SidebarModel) RefreshTheme() SidebarModel
- func (m SidebarModel) SetSize(w, h int) SidebarModel
- func (m SidebarModel) Update(msg tea.Msg) (SidebarModel, tea.Cmd)
- func (m SidebarModel) View() string
- type TestRow
- type Theme
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllThemeOptions ¶
func AllThemeOptions() []themeOption
AllThemeOptions returns a sorted list for the settings picker: built-ins in their canonical order, then user themes alphabetically.
func LoadUserThemes ¶
func LoadUserThemes(dir string)
LoadUserThemes scans dir for *.json files, parses them as themes, and registers any valid ones into the global theme registry.
func WriteExampleTheme ¶
func WriteExampleTheme(dir string)
WriteExampleTheme writes a starter theme JSON to dir/example.json if it doesn't already exist. This helps users discover the format.
Types ¶
type EditorModel ¶
type EditorModel struct {
// contains filtered or unexported fields
}
func (EditorModel) Blur ¶
func (m EditorModel) Blur() EditorModel
func (EditorModel) BodyValue ¶
func (m EditorModel) BodyValue() string
BodyValue returns the current raw body text.
func (EditorModel) BuildRequest ¶
func (m EditorModel) BuildRequest() store.Request
func (EditorModel) Focus ¶
func (m EditorModel) Focus() EditorModel
func (EditorModel) IsEditingContent ¶ added in v0.3.0
func (m EditorModel) IsEditingContent() bool
IsEditingContent returns true when the user is actively typing in a textarea or text field - used to suppress global single-character shortcuts like `?`.
func (EditorModel) Load ¶
func (m EditorModel) Load(r *store.Request, collID string) EditorModel
func (EditorModel) RefreshTheme ¶ added in v0.2.0
func (m EditorModel) RefreshTheme() EditorModel
RefreshTheme re-applies the current theme palette to every input widget. Call this after applyTheme() to keep input colors in sync.
func (EditorModel) SetBody ¶
func (m EditorModel) SetBody(s string) EditorModel
SetBody replaces the body textarea content.
func (EditorModel) SetEnvVars ¶ added in v0.5.0
func (m EditorModel) SetEnvVars(vars map[string]string) EditorModel
func (EditorModel) TestsScript ¶
func (m EditorModel) TestsScript() string
func (EditorModel) Update ¶
func (m EditorModel) Update(msg tea.Msg) (EditorModel, tea.Cmd)
func (EditorModel) View ¶
func (m EditorModel) View() string
type EnvEditorModel ¶ added in v0.3.0
type EnvEditorModel struct {
// contains filtered or unexported fields
}
func (EnvEditorModel) Build ¶ added in v0.3.0
func (m EnvEditorModel) Build() *store.Environment
func (EnvEditorModel) Load ¶ added in v0.3.0
func (m EnvEditorModel) Load(e *store.Environment) EnvEditorModel
func (EnvEditorModel) SetSize ¶ added in v0.3.0
func (m EnvEditorModel) SetSize(w, h int) EnvEditorModel
func (EnvEditorModel) Update ¶ added in v0.3.0
func (m EnvEditorModel) Update(msg tea.Msg) (EnvEditorModel, tea.Cmd)
func (EnvEditorModel) View ¶ added in v0.3.0
func (m EnvEditorModel) View() string
type HistoryModel ¶ added in v0.3.0
type HistoryModel struct {
// contains filtered or unexported fields
}
func (HistoryModel) SetSize ¶ added in v0.3.0
func (m HistoryModel) SetSize(w, h int) HistoryModel
func (HistoryModel) Update ¶ added in v0.3.0
func (m HistoryModel) Update(msg tea.KeyMsg) (HistoryModel, tea.Cmd)
func (HistoryModel) View ¶ added in v0.3.0
func (m HistoryModel) View() string
type PaletteModel ¶
type PaletteModel struct {
// contains filtered or unexported fields
}
func (PaletteModel) Update ¶
func (m PaletteModel) Update(msg tea.KeyMsg) (PaletteModel, tea.Cmd)
func (PaletteModel) View ¶
func (m PaletteModel) View() string
type PluginManagerModel ¶ added in v0.4.0
type PluginManagerModel struct {
// contains filtered or unexported fields
}
func (PluginManagerModel) Selected ¶ added in v0.4.0
func (m PluginManagerModel) Selected() (plugins.Info, bool)
func (PluginManagerModel) SetSize ¶ added in v0.4.0
func (m PluginManagerModel) SetSize(w, h int) PluginManagerModel
func (PluginManagerModel) Update ¶ added in v0.4.0
func (m PluginManagerModel) Update(msg tea.KeyMsg) (PluginManagerModel, tea.Cmd)
func (PluginManagerModel) View ¶ added in v0.4.0
func (m PluginManagerModel) View() string
type ResponseModel ¶
type ResponseModel struct {
// contains filtered or unexported fields
}
func (ResponseModel) AppendStreamLine ¶
func (m ResponseModel) AppendStreamLine(line string) ResponseModel
func (ResponseModel) Blur ¶
func (m ResponseModel) Blur() ResponseModel
func (ResponseModel) FinalizeStream ¶
func (m ResponseModel) FinalizeStream(elapsed time.Duration, body []byte, ct string) ResponseModel
func (ResponseModel) Focus ¶
func (m ResponseModel) Focus() ResponseModel
func (ResponseModel) HasJSONTree ¶ added in v0.2.0
func (m ResponseModel) HasJSONTree() bool
func (ResponseModel) InTreeMode ¶ added in v0.2.0
func (m ResponseModel) InTreeMode() bool
func (ResponseModel) InVisualMode ¶
func (m ResponseModel) InVisualMode() bool
func (ResponseModel) RefreshTheme ¶ added in v0.3.0
func (m ResponseModel) RefreshTheme() ResponseModel
func (ResponseModel) SetError ¶
func (m ResponseModel) SetError(err error) ResponseModel
func (ResponseModel) SetLoading ¶
func (m ResponseModel) SetLoading(v bool) ResponseModel
func (ResponseModel) SetResult ¶
func (m ResponseModel) SetResult(r *result) ResponseModel
func (ResponseModel) SetSize ¶
func (m ResponseModel) SetSize(w, h int) ResponseModel
func (ResponseModel) SetTestRows ¶
func (m ResponseModel) SetTestRows(rows []TestRow) ResponseModel
func (ResponseModel) SetTooLarge ¶ added in v0.2.0
func (m ResponseModel) SetTooLarge(r *result) ResponseModel
func (ResponseModel) Update ¶
func (m ResponseModel) Update(msg tea.Msg) (ResponseModel, tea.Cmd)
func (ResponseModel) View ¶
func (m ResponseModel) View() string
type RunnerModel ¶
type RunnerModel struct {
// contains filtered or unexported fields
}
func (RunnerModel) SetResult ¶
func (m RunnerModel) SetResult(idx int, r runnerResult) RunnerModel
func (RunnerModel) SetSize ¶
func (m RunnerModel) SetSize(w, h int) RunnerModel
func (RunnerModel) View ¶
func (m RunnerModel) View() string
type SettingsModel ¶
type SettingsModel struct {
// contains filtered or unexported fields
}
func (SettingsModel) ExitThemeEditor ¶
func (m SettingsModel) ExitThemeEditor() SettingsModel
func (SettingsModel) InThemeEditor ¶
func (m SettingsModel) InThemeEditor() bool
func (SettingsModel) MaxDisplayBytesValue ¶ added in v0.5.0
func (m SettingsModel) MaxDisplayBytesValue() int
func (SettingsModel) SelectedTheme ¶
func (m SettingsModel) SelectedTheme() string
func (SettingsModel) TimeoutValue ¶
func (m SettingsModel) TimeoutValue() int
TimeoutValue returns the parsed timeout in seconds, falling back to the previous value if the field is empty or non-numeric.
func (SettingsModel) Update ¶
func (m SettingsModel) Update(msg tea.Msg) (SettingsModel, tea.Cmd)
func (SettingsModel) View ¶
func (m SettingsModel) View() string
type SidebarModel ¶
type SidebarModel struct {
// contains filtered or unexported fields
}
func (SidebarModel) Blur ¶
func (m SidebarModel) Blur() SidebarModel
func (SidebarModel) Collections ¶
func (m SidebarModel) Collections() []*store.Collection
func (SidebarModel) Focus ¶
func (m SidebarModel) Focus() SidebarModel
func (SidebarModel) InReqsMode ¶
func (m SidebarModel) InReqsMode() bool
func (SidebarModel) PendingDelete ¶
func (m SidebarModel) PendingDelete() bool
func (SidebarModel) Refresh ¶
func (m SidebarModel) Refresh(cols []*store.Collection) SidebarModel
func (SidebarModel) RefreshTheme ¶
func (m SidebarModel) RefreshTheme() SidebarModel
func (SidebarModel) SetSize ¶
func (m SidebarModel) SetSize(w, h int) SidebarModel
func (SidebarModel) Update ¶
func (m SidebarModel) Update(msg tea.Msg) (SidebarModel, tea.Cmd)
func (SidebarModel) View ¶
func (m SidebarModel) View() string
type Theme ¶
type Theme struct {
ChromaStyle string
Background lipgloss.Color // empty = use terminal default
Accent lipgloss.Color
Muted lipgloss.Color
Border lipgloss.Color
Success lipgloss.Color
Warn lipgloss.Color
Error lipgloss.Color
Subtle lipgloss.Color
Text lipgloss.Color
SearchMatchBg lipgloss.Color
SearchMatchFg lipgloss.Color
BadgeFg lipgloss.Color
MethodColors map[string]lipgloss.Color
// contains filtered or unexported fields
}
func ThemeFromJSON ¶
ThemeFromJSON parses a user theme JSON file.