Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsProduction ¶
func IsProduction() bool
IsProduction returns true if the environment is production.
Types ¶
type AppConfig ¶
type AppConfig struct {
Env string `default:"production"`
}
AppConfig holds application-level configuration.
type Configuration ¶
type Configuration struct {
AppConfig
ServerConfig
ContainerConfig
}
Configuration aggregates all config sections.
func Get ¶
func Get() Configuration
Get returns the loaded configuration, loading it if necessary. Panics if loading fails.
type ContainerConfig ¶ added in v1.1.0
type ContainerConfig struct {
Port string `default:"8080"`
}
ContainerConfig holds container-specific configuration.
type ServerConfig ¶
type ServerConfig struct {
MaxBodySize int `default:"10485760" split_words:"true"`
ReadTimeout int `default:"10" split_words:"true"` // seconds
WriteTimeout int `default:"10" split_words:"true"` // seconds
IdleTimeout int `default:"620" split_words:"true"` // seconds
}
ServerConfig holds server-related configuration.
Click to show internal directories.
Click to hide internal directories.