Documentation
¶
Overview ¶
Package config loads and merges convertr configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveWorkers ¶ added in v0.1.1
ResolveWorkers determines the effective worker count. Priority: cfgWorkers (from file+env+profile) is used unless flagSet is true, in which case flagVal wins. A non-positive value resolves to runtime.GOMAXPROCS(0).
Types ¶
type BackendConfig ¶
type BackendConfig struct {
ExtraArgs []string `toml:"extra_args"`
}
BackendConfig holds per-backend overrides (extra_args, etc.).
type Config ¶
type Config struct {
Defaults DefaultsConfig `toml:"defaults"`
Fonts fonts.Config `toml:"fonts"`
Backend map[string]BackendConfig `toml:"backend"`
Profile map[string]ProfileConfig `toml:"profile"`
}
Config is the top-level configuration structure.
func MergeProfile ¶
MergeProfile applies profile overrides on top of cfg. Zero/empty fields in the profile leave the corresponding field unchanged.
type DefaultsConfig ¶
type DefaultsConfig struct {
Quality int `toml:"quality"` // 0 = unset
Workers int `toml:"workers"` // 0 = GOMAXPROCS
OnError string `toml:"on_error"` // skip|stop|retry
OnConflict string `toml:"on_conflict"` // overwrite|skip|rename|error
}
DefaultsConfig holds global defaults applied to every conversion.
type FieldSource ¶
FieldSource records the origin of each top-level field.
type Loaded ¶
type Loaded struct {
Config
Sources FieldSource
}
Loaded is the resolved configuration together with field provenance.