Documentation
¶
Index ¶
Constants ¶
View Source
const ( APP_STAGE_PROD = iota APP_STAGE_TEST = iota APP_STAGE_DEV = iota )
Variables ¶
View Source
var VarCannotBeEmpty = errors.New("Variable cannot be empty")
Functions ¶
func GetSmtpCfgFromEnv ¶
func GetSmtpCfgFromEnv() (SMTPConfig, EnvErr)
Types ¶
type AppConfig ¶
type AppConfig struct { AppStage int // Default production Address string // Default "127.0.0.1" Domain string // Default: "" // Default 80 if TLS disabled and 433 if enabled HTTPPort int ApiPrefix string // Default "/" // TLS config PathToCert string // .crt || .pem file PathToKey string // .key file // necessary to be true if stage is production EnableTLS bool PostgresURL string PgMigrationConfig MigrationConfig RedisConfig *redis.Options SMTPConfig SMTPConfig }
type EnvErr ¶
type EnvErr = errorsx.CustomErr[EnvErrInfo]
func GetPgUrlFromEnv ¶
func GetRedisOptionsFromEnv ¶
func GetRedisOptionsFromEnv() (*redis.Options, EnvErr)
type EnvErrInfo ¶
type EnvErrInfo struct {
VarName string
}
type MigrationConfig ¶
type SMTPConfig ¶
Click to show internal directories.
Click to hide internal directories.