Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { API APIConfig //Storage Postgres PostgresConfig }
func LoadConfig ¶
type PostgresConfig ¶
type PostgresConfig struct { DatabaseName string `envconfig:"DATABASE_NAME" default:"simple_bank_db"` User string `envconfig:"DATABASE_USER" default:"postgres"` Password string `envconfig:"DATABASE_PASSWORD" default:"postgres"` Host string `envconfig:"DATABASE_HOST_DIRECT" default:"localhost"` Port string `envconfig:"DATABASE_PORT_DIRECT" default:"5432"` PoolMinSize string `envconfig:"DATABASE_POOL_MIN_SIZE" default:"2"` PoolMaxSize string `envconfig:"DATABASE_POOL_MAX_SIZE" default:"10"` PoolMaxConnLifetime string `envconfig:"DATABASE_POOL_MAX_CONN_LIFETIME"` PoolMaxConnIdleTime string `envconfig:"DATABASE_POOL_MAX_CONN_IDLE_TIME"` PoolHealthCheckPeriod string `envconfig:"DATABASE_POOL_HEALTHCHECK_PERIOD"` SSLMode string `envconfig:"DATABASE_SSLMODE" default:"disable"` SSLRootCert string `envconfig:"DATABASE_SSL_ROOTCERT"` SSLCert string `envconfig:"DATABASE_SSL_CERT"` SSLKey string `envconfig:"DATABASE_SSL_KEY"` Hostname string `envconfig:"HOSTNAME" default:"localhost"` }
Click to show internal directories.
Click to hide internal directories.