postgres

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL