Documentation
¶
Index ¶
Constants ¶
const ( DefaultScriptTimeout = 5 * time.Second DefaultScriptEnabled = true )
Script configuration defaults
Variables ¶
This section is empty.
Functions ¶
func GetGlobalConfigPath ¶
func GetGlobalConfigPath() string
GetGlobalConfigPath returns the global config file path
func GetWorkspacePath ¶
GetWorkspacePath returns the workspace path (current directory)
func InitWorkspace ¶
InitWorkspace initializes a new workspace in the current directory
Types ¶
type Environment ¶
type Environment struct {
Name string `yaml:"name"`
Description string `yaml:"description,omitempty"`
Variables map[string]string `yaml:"variables"`
}
Environment represents an environment with variables
type GlobalConfig ¶
type GlobalConfig struct {
Theme ThemeConfig `yaml:"theme"`
KeyBindings KeyBindings `yaml:"keybindings"`
Editor string `yaml:"editor"`
Workspaces []string `yaml:"workspaces"` // List of recent workspaces
LastWorkspace string `yaml:"last_workspace"`
Environments map[string]*Environment `yaml:"global_environments,omitempty"`
Script ScriptConfig `yaml:"script"`
}
GlobalConfig represents the global configuration
func DefaultGlobalConfig ¶
func DefaultGlobalConfig() *GlobalConfig
DefaultGlobalConfig returns default global configuration
func LoadGlobalConfig ¶
func LoadGlobalConfig() (*GlobalConfig, error)
LoadGlobalConfig loads global configuration from file
func (*GlobalConfig) Save ¶
func (c *GlobalConfig) Save() error
SaveGlobalConfig saves global configuration to file
type KeyBindings ¶
type KeyBindings struct {
Quit []string `yaml:"quit"`
Select []string `yaml:"select"`
Back []string `yaml:"back"`
NewRequest []string `yaml:"new_request"`
SendRequest []string `yaml:"send_request"`
SaveRequest []string `yaml:"save_request"`
DeleteRequest []string `yaml:"delete_request"`
FocusCollections []string `yaml:"focus_collections"`
FocusRequest []string `yaml:"focus_request"`
FocusResponse []string `yaml:"focus_response"`
ToggleEnvs []string `yaml:"toggle_envs"`
ImportCurl []string `yaml:"import_curl"`
ExportCurl []string `yaml:"export_curl"`
ImportOpenAPI []string `yaml:"import_openapi"`
}
KeyBindings represents customizable key bindings
func DefaultKeyBindings ¶
func DefaultKeyBindings() KeyBindings
DefaultKeyBindings returns default vim-style key bindings
type ScriptConfig ¶ added in v1.3.0
type ScriptConfig struct {
// Timeout is the maximum execution time for scripts
Timeout time.Duration `yaml:"timeout"`
// Enabled controls whether scripting is active
Enabled bool `yaml:"enabled"`
}
ScriptConfig holds scripting-related configuration
func DefaultScriptConfig ¶ added in v1.3.0
func DefaultScriptConfig() ScriptConfig
DefaultScriptConfig returns default script configuration
type ThemeConfig ¶
type ThemeConfig struct {
Name string `yaml:"name"`
PrimaryColor string `yaml:"primary_color"`
SecondaryColor string `yaml:"secondary_color"`
AccentColor string `yaml:"accent_color"`
BorderColor string `yaml:"border_color"`
ActiveColor string `yaml:"active_color"`
}
ThemeConfig represents theme configuration
type WorkspaceConfig ¶
type WorkspaceConfig struct {
Name string `yaml:"name"`
Description string `yaml:"description,omitempty"`
DefaultEnv string `yaml:"default_env,omitempty"`
Collections []string `yaml:"collections,omitempty"`
}
WorkspaceConfig represents a workspace configuration (.lazycurl/config.yaml)
func DefaultWorkspaceConfig ¶
func DefaultWorkspaceConfig() *WorkspaceConfig
DefaultWorkspaceConfig returns default workspace configuration
func LoadWorkspaceConfig ¶
func LoadWorkspaceConfig(workspacePath string) (*WorkspaceConfig, error)
LoadWorkspaceConfig loads workspace configuration
func (*WorkspaceConfig) Save ¶
func (c *WorkspaceConfig) Save(workspacePath string) error
SaveWorkspaceConfig saves workspace configuration