Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
LoadEnv loads environment variables from a .env file. If paths are omitted, it loads ".env" from the current working directory. Fills optional config if any
func LoadOptional ¶ added in v0.2.2
func ValidateDBConfig ¶ added in v0.8.1
Types ¶
type CacheConfig ¶ added in v0.5.0
type CacheConfig struct {
Host string
Port string
Password string
Username string
Prefix string
RetryCount int
}
Cache Config
func LoadCache ¶ added in v0.5.0
func LoadCache() CacheConfig
CacheConfigFromEnv reads cache settings from environment variables.
type DBConfig ¶ added in v0.8.0
type DBConfig struct {
Host string
User string
Database string
Port string
Password string
MaxOpenConns int
MaxIdleConns int
ConnMaxLifetime time.Duration
RetryCount int
}
Common db config
type MySQLConfig ¶
type MySQLConfig struct {
DBConfig
}
MySQL Config
func LoadMySQL ¶
func LoadMySQL() MySQLConfig
MySQLConfigFromEnv reads MySQL settings from environment variables.
type PostgreSQLConfig ¶
Postgre Config
func LoadPostgreSQL ¶
func LoadPostgreSQL() PostgreSQLConfig
PostgreSQLConfigFromEnv reads PostgreSQL settings from environment variables.
type SagaConfig ¶ added in v0.7.0
Saga Config
func LoadSaga ¶ added in v0.7.0
func LoadSaga() SagaConfig
Click to show internal directories.
Click to hide internal directories.