Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { BindAddr string `split_words:"true" default:":8090"` Mode string `default:"release"` LogLevel logger.LevelDecoder `split_words:"true" default:"info"` ConsoleLog bool `split_words:"true" default:"false"` AllowOrigins []string `split_words:"true" default:"http://localhost:8090"` StatusInterval time.Duration `split_words:"true" default:"15s"` DataPath string `split_words:"true" default:".uptime"` ServiceInfo string `split_words:"true" required:"false"` // contains filtered or unexported fields }
func New ¶
New loads and parses the config from the environment and validates it, marking it as processed so that external users can determine if the config is ready for use. This should be the only way Config objects are created for use in the application.
func (Config) GetLogLevel ¶
func (Config) IsZero ¶
Returns true if the config has not been correctly processed from the environment.
Click to show internal directories.
Click to hide internal directories.