Discover Packages
github.com/z0rr0/ggp
config
package
Version:
v0.0.13
Opens a new window with list of versions in this module.
Published: Dec 4, 2025
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: ? modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package config provides configuration loading and validation for the application.
type Base struct {
Timezone string `toml:"timezone"`
Admins []int64 `toml:"admins"`
Debug bool `toml:"debug"`
TimeLocation *time .Location `toml:"-"`
AdminIDs map[int64 ]struct{} `toml:"-"`
}
type Config struct {
Base Base `toml:"base"`
Database Database `toml:"database"`
Fetcher Fetcher `toml:"fetcher"`
Holidayer Holidayer `toml:"holidayer"`
Predictor Predictor `toml:"predictor"`
Telegram Telegram `toml:"telegram"`
}
Config represents the application configuration.
Load reads and parses a TOML configuration file.
type Database struct {
Path string `toml:"path"`
QueryTimeout int `toml:"query_timeout"`
Timeout time .Duration `toml:"-"`
}
type Fetcher struct {
Active bool `toml:"active"`
Period int `toml:"period"`
Token string `toml:"token"`
URL string `toml:"url"`
Timeout time .Duration `toml:"-"`
}
Fetcher contains fetcher configuration.
AuthToken returns the authorization token with the required prefix.
type Holidayer struct {
Active bool `toml:"active"`
Period int `toml:"period"`
URL string `toml:"url"`
Timeout time .Duration `toml:"-"`
}
Holidayer contains holidayer configuration.
type Predictor struct {
Active bool `toml:"active"`
Hours uint8 `toml:"hours"`
}
Predictor contains predictor configuration.
type Telegram struct {
Active bool `toml:"active"`
Token string `toml:"token"`
}
Telegram contains Telegram bot configuration.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.