Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustParseFromEnv ¶
func MustParseFromEnv(config *Config)
Types ¶
type Config ¶
type Config struct { Postgres PostgresConfig ServerPort int `default:"4000" envconfig:"PORT"` JWTSecret string `default:"MaPoDouFu" envconfig:"JWT_SECRET"` MigrationsPath string `default:"./internal/db/migrations" envconfig:"MIGRATIONS_PATH"` }
func DefaultConfig ¶
func DefaultConfig() *Config
func DefaultTestConfig ¶
func DefaultTestConfig() *Config
type PostgresConfig ¶
type PostgresConfig struct { Host string `default:"" envconfig:"POSTGRES_HOST"` Port int `default:"" envconfig:"POSTGRES_PORT"` Username string `default:"" envconfig:"POSTGRES_USER"` Password string `default:"" envconfig:"POSTGRES_PASSWORD"` DBName string `default:"" envconfig:"POSTGRES_DB"` DataBaseURL string `default:"" envconfig:"DATABASE_URL"` }
func (PostgresConfig) GetDataSourceName ¶
func (c PostgresConfig) GetDataSourceName() string
Click to show internal directories.
Click to hide internal directories.