package
Version:
v1.1.0
Opens a new window with list of versions in this module.
Published: Aug 23, 2021
License: Apache-2.0
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Bot struct {
BotToken string `envconfig:"BOT_TOKEN"`
AccessID int `envconfig:"ACCESS_ID"`
}
Bot config.
type Config struct {
Bot *Bot `yaml:"bot"`
Logger *Logger `yaml:"logger"`
DB *DB `yaml:"db"`
}
Config app.
Parse config file and env vars.
ParseFile parse config file.
type DB struct {
Type string `yaml:"type" envconfig:"DB_TYPE"`
Host string `yaml:"host" envconfig:"DB_HOST"`
Port string `yaml:"port" envconfig:"DB_PORT"`
User string `yaml:"user" envconfig:"DB_USER"`
Name string `yaml:"name" envconfig:"DB_NAME"`
Password string `yaml:"password" envconfig:"DB_PASSWORD"`
MigrationsPath string `yaml:"migrations_path" envconfig:"DB_MIGRATIONS_PATH"`
}
DB config.
type Logger struct {
Level string `yaml:"level" envconfig:"LOGGER_LEVEL"`
File string `yaml:"file" envconfig:"LOGGER_FILE"`
}
Logger config.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.