Documentation
¶
Overview ¶
Package config provides configuration loading and validation for the application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct {
TimeLocation *time.Location `toml:"-"`
AdminIDs map[int64]struct{} `toml:"-"`
Timezone string `toml:"timezone"`
Admins []int64 `toml:"admins"`
Debug bool `toml:"debug"`
}
Base contains base application settings.
type Config ¶
type Config struct {
Telegram Telegram `toml:"telegram"`
Base Base `toml:"base"`
Database Database `toml:"database"`
Fetcher Fetcher `toml:"fetcher"`
Holidayer Holidayer `toml:"holidayer"`
Predictor Predictor `toml:"predictor"`
}
Config represents the application configuration.
type Database ¶
type Database struct {
Path string `toml:"path"`
Timeout time.Duration `toml:"-"`
QueryTimeout int `toml:"query_timeout"`
Threads uint8 `toml:"threads"`
}
Database contains database connection settings.
type Fetcher ¶
type Fetcher struct {
Token string `toml:"token"`
URL string `toml:"url"`
Timeout time.Duration `toml:"-"`
Period int `toml:"period"`
Active bool `toml:"active"`
}
Fetcher contains fetcher configuration.
type Holidayer ¶ added in v0.0.12
type Holidayer struct {
URL string `toml:"url"`
Timeout time.Duration `toml:"-"`
Period int `toml:"period"`
Active bool `toml:"active"`
}
Holidayer contains holidayer configuration.