package
Version:
v0.0.0-...-824ed62
Opens a new window with list of versions in this module.
Published: Jul 21, 2023
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
View Source
const (
DebugLogLvl = "DEBUG"
InfoLogLvl = "INFO"
ErrorLogLvl = "ERROR"
)
Allowed logger levels & config key.
type AuthConfig struct {
Salt string `env:"APP_SALT,notEmpty"`
SigningKey string `env:"SIGNING_KEY,notEmpty"`
AccessTokenTTL time.Duration `env:"ACCESS_TOKEN_TTL" envDefault:"15m"`
RefreshTokenTTL time.Duration `env:"REFRESH_TOKEN_TTL" envDefault:"24h"`
}
type Postgres struct {
Host string `env:"DB_HOST,notEmpty"`
Port string `env:"DB_PORT" envDefault:"5432"`
Database string `env:"DB_NAME,notEmpty"`
User string `env:"DB_USER,notEmpty"`
Password string `env:"DB_PASSWORD,notEmpty"`
SSLmode string `env:"DB_SSL_MODE" envDefault:"disable"`
}
type SMTP struct {
MailAccount string `env:"SMTP_ACCOUNT"`
AccountPassword string `env:"SMTP_PASSWORD"`
SMTPServerAddress string `env:"SMTP_ADDRESS"`
SMTPPort string `env:"SMTP_PORT"`
CaptchaKey string `env:"CAPTCHA_KEY"`
}
type Server struct {
AppAddress string `env:"APP_PORT" envDefault:"7000"`
AppReadTimeout time.Duration `env:"APP_READ_TIMEOUT" envDefault:"60s"`
AppWriteTimeout time.Duration `env:"APP_WRITE_TIMEOUT" envDefault:"60s"`
AppIdleTimeout time.Duration `env:"APP_IDLE_TIMEOUT" envDefault:"60s"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.