Documentation ¶
Index ¶
Constants ¶
View Source
const RETRY_TIMES = 6
Variables ¶
This section is empty.
Functions ¶
func NewPostgresConnection ¶
func NewPostgresConnection(config *PostgresConfig, logger *zap.SugaredLogger) (*gorm.DB, error)
Types ¶
type PostgresConfig ¶
type PostgresConfig struct { Addr string `env:"ILLA_PG_ADDR" envDefault:"localhost"` Port string `env:"ILLA_PG_PORT" envDefault:"5432"` User string `env:"ILLA_PG_USER" envDefault:"illa_supervisor"` Password string `env:"ILLA_PG_PASSWORD" envDefault:"illa2022"` Database string `env:"ILLA_PG_DATABASE" envDefault:"illa_supervisor"` }
func GetPostgresConfig ¶
func GetPostgresConfig() (*PostgresConfig, error)
Click to show internal directories.
Click to hide internal directories.