Documentation ¶
Index ¶
Constants ¶
View Source
const ( AppDomain = "APP_DOMAIN" SMTPHost = "SMTP_HOST" SMTPPort = "SMTP_PORT" TechEmail = "TECH_EMAIL" PasswordForTechEmail = "PASSWORD_FOR_TECH_EMAIL" DBUser = "DB_USER" DBPassword = "DB_PASSWORD" DBHost = "DB_HOST" DBPort = "DB_PORT" DBName = "DB_NAME" InMemoryStorageHost = "IN_MEMORY_STORAGE_HOST" InMemoryStoragePort = "IN_MEMORY_STORAGE_PORT" InMemoryStoragePassword = "IN_MEMORY_STORAGE_PASSWORD" //nolint:gosec )
Variables ¶
View Source
var ErrEmptyEnvVar = errors.New("empty environment variable")
Functions ¶
func CheckEnvironmentVars ¶
func CheckEnvironmentVars() error
Types ¶
type Config ¶
type Config struct { AppConfig AppConfig SMTP SMTPConfig Database DatabaseConfig InMemoryStorage InMemoryStorageConfig }
func BuildFromEnv ¶
func BuildFromEnv() Config
type DatabaseConfig ¶
type DatabaseConfig struct { User string Password string Host string Port string DatabaseName string }
func (DatabaseConfig) ConnectionString ¶
func (dbc DatabaseConfig) ConnectionString() string
type InMemoryStorageConfig ¶
Click to show internal directories.
Click to hide internal directories.