postgres

package
v1.9.1-0...-8664551 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 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)

func NewPostgresConnectionByGlobalConfig

func NewPostgresConnectionByGlobalConfig(config *config.Config, 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:"5433"`
	User     string `env:"ILLA_PG_USER" envDefault:"illa_cloud"`
	Password string `env:"ILLA_PG_PASSWORD" envDefault:"illa2022"`
	Database string `env:"ILLA_PG_DATABASE" envDefault:"illa_cloud"`
}

Jump to

Keyboard shortcuts

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