Documentation
¶
Index ¶
Constants ¶
const ( DefaultArchiveDir = ".local/share/carn" DefaultClaudeSourceDir = ".claude/projects" DefaultCodexSourceDir = ".codex/sessions" DefaultLogDir = ".local/state/carn" DefaultLogFileName = "carn.log" DefaultTimestampFormat = "2006-01-02 15:04" DefaultBrowserCacheSize = 20 DefaultDeepSearchDebounceMs = 200 DefaultLogLevel = "info" DefaultMaxSizeMB = 10 DefaultMaxBackups = 3 )
Variables ¶
This section is empty.
Functions ¶
func DefaultTemplate ¶
func DefaultTemplate() string
DefaultTemplate returns a TOML string with all default values commented out and explanatory comments. Suitable for writing to a new config file.
func ParseLogLevel ¶
ParseLogLevel converts a level name to a zerolog level constant. An empty string defaults to info level.
func ResolvePath ¶
ResolvePath returns the resolved path to the config file under the user-scoped config directory.
Types ¶
type Config ¶
type Config struct {
Paths PathsConfig
Display DisplayConfig
Search SearchConfig
Logging LoggingConfig
}
Config is the fully resolved application configuration. All fields have valid values after Load returns successfully.
func Load ¶
Load resolves configuration from defaults and config file. Precedence: config file > defaults. If the config file does not exist, defaults are used silently. If the config file exists but is malformed, an error is returned.
func (Config) ArchiveConfig ¶
ArchiveConfig derives an archive.Config from the resolved configuration.
type DisplayConfig ¶
type LoggingConfig ¶
type PathsConfig ¶
type SearchConfig ¶
type SearchConfig struct {
DeepSearchDebounceMs int
}