sql

package
v0.0.0-...-4f441f0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDbConnection

func NewDbConnection(cfg *Config, logger *zap.SugaredLogger) (*pg.DB, error)

Types

type Config

type Config struct {
	Addr            string `env:"PG_ADDR" envDefault:"127.0.0.1"`
	Port            string `env:"PG_PORT" envDefault:"5432"`
	User            string `env:"PG_USER" envDefault:"postgres"`
	Password        string `env:"PG_PASSWORD" envDefault:"devtronpg"`
	Database        string `env:"PG_DATABASE" envDefault:"telemetry-user-analytics"`
	ApplicationName string `env:"APP" envDefault:"telemetry-telemetry-analytics"`
	LogQuery        bool   `env:"PG_LOG_QUERY" envDefault:"true"`
}

func GetConfig

func GetConfig() (*Config, error)

Jump to

Keyboard shortcuts

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