Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppConfig ¶
type AppConfig struct { CacheTimer time.Duration ListenPort uint16 Logger *log.Logger LogLevel log.Level TemplateCache models.TemplateCache UseCache bool }
AppConfig contains data to be accessed across the app.
func Initialise ¶
func Initialise() AppConfig
Initialises the app wide AppConfig, loads values from environment, and set up the Logger
type ConfigDatabase ¶
type ConfigDatabase struct { CacheTimer time.Duration `env:"CACHETIMER" env-description:"How often to automatically regenerate template cache."` LogLevel string `env:"LOGLEVEL" env-description:"Logging level. Default: warn, Possible values: debug info warn error fatal none"` Port uint16 `env:"PORT" env-description:"server port"` UseCache bool `env:"CACHE" env-description:"Use template cache"` }
ConfigDatabase contains data to be loaded from environmental variables
Click to show internal directories.
Click to hide internal directories.