20 lines
418 B
Go
20 lines
418 B
Go
package config
|
|
|
|
type PostgresConfig struct {
|
|
User string
|
|
Password string
|
|
Host string
|
|
Port string
|
|
DBName string
|
|
}
|
|
|
|
func NewPostgresConfig() *PostgresConfig {
|
|
return &PostgresConfig{
|
|
User: GetEnvOrDie("POSTGRES_USER"),
|
|
Password: GetEnvOrDie("POSTGRES_PASSWORD"),
|
|
Host: GetEnvOrDie("POSTGRES_HOST"),
|
|
Port: GetEnvOrDie("POSTGRES_PORT"),
|
|
DBName: GetEnvOrDie("POSTGRES_DB"),
|
|
}
|
|
}
|