package
Version:
v0.0.0-...-37e7878
Opens a new window with list of versions in this module.
Published: Sep 9, 2024
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
LoadConfig Load config file from given path -.
type AppConfig struct {
Mode string `yaml:"mode"`
LoginLimit int `yaml:"loginLimit"`
PassLimit int `yaml:"passLimit"`
IPLimit int `yaml:"ipLimit"`
}
ParseConfig Parse config file -.
type LoggerConfig struct {
Development bool `yaml:"development"`
Level string `yaml:"level"`
}
type Postgres struct {
Dsn string `yaml:"dsn"`
PoolMax int `yaml:"poolMax" env:"PG_POOL_MAX"`
}
type Redis struct {
Host string `env:"APP_REDIS_HOST"`
Port string `env:"APP_REDIS_PORT"`
Password string `env:"APP_REDIS_PASSWORD"`
}
type ServerConfig struct {
Port string `yaml:"port"`
Mode string `yaml:"mode"`
ReadTimeout time.Duration `yaml:"readTimeout"`
WriteTimeout time.Duration `yaml:"writeTimeout"`
CtxDefaultTimeout time.Duration `yaml:"ctxDefaultTimeout"`
Debug bool `yaml:"debug"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.