db

package
v0.0.0-...-0825164 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() (*gorm.DB, error)

Init executes the setup related with the DB connection

Types

type Config

type Config struct {
	DBHost         *string `default:"localhost"`
	DBPort         *int    `default:"5432"`
	DBUser         *string `default:"config"`
	DBPassword     *string `default:"config"`
	DBName         *string `default:"live_config"`
	DBSSLMode      *string `default:"disable"`
	DBMaxIdleConns *int    `default:"10"  envconfig:"db_max_idle_conns"`
	DBMaxOpenConns *int    `default:"100" envconfig:"db_max_open_conns"`
}

Config represents a configuration object with values that can be passed via env variable

func New

func New() *Config

New gets a configuration object

Jump to

Keyboard shortcuts

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