Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Address string `json:"address"`
ReadTimeout time.Duration `json:"read_timeout"`
WriteTimeout time.Duration `json:"write_timeout"`
IdleTimeout time.Duration `json:"idle_timeout"`
ReadHeaderTimeout time.Duration `json:"read_header_timeout"`
ShutdownTimeout time.Duration `json:"shutdown_timeout"`
MaxHeaderBytes int `json:"max_header_bytes"`
TemplatesDir string `json:"templates_dir"`
LayoutTemplate string `json:"layout_template"`
TemplateReload bool `json:"template_reload"`
LogLevel string `json:"log_level"`
LogFormat string `json:"log_format"`
}
Config holds app configuration.
func LoadFromEnv ¶
LoadFromEnv applies environment overrides with a prefix (e.g. BEBO_).
func LoadFromFile ¶
LoadFromFile loads configuration from a JSON file into the base config.
func LoadProfile ¶
LoadProfile loads Config from a layered profile with validation.
Click to show internal directories.
Click to hide internal directories.