Documentation ¶
Index ¶
Constants ¶
View Source
const ( DEFAULT_LOG_LEVEL = "info" DEFAULT_PORT = 8080 DEFAULT_CACHE = time.Duration(5 * time.Minute) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { LogLevel string `yaml:"logLevel,omitempty"` Port int `yaml:"port,omitempty"` Cache time.Duration `yaml:"cache,omitempty"` SpeedtestCLI string `yaml:"speedtestCLI,omitempty"` Remote RemoteConfig `yaml:"remote,omitempty"` }
func LoadConfig ¶
Loads config from file, returns error if config is invalid Arguments:
path: Path to config file mode: Mode used, determines how the config will be validated and which values will be processed env: Determines if enviroment variables in the file will be expanded before decoding
type ErrInvalidInterval ¶
func (*ErrInvalidInterval) Error ¶
func (e *ErrInvalidInterval) Error() string
type ErrUnknownLogLevel ¶
type ErrUnknownLogLevel struct {
Level string
}
func (*ErrUnknownLogLevel) Error ¶
func (e *ErrUnknownLogLevel) Error() string
Click to show internal directories.
Click to hide internal directories.