connector

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PostgresHost        = "host"
	PostgresPort        = "port"
	PostgresDBName      = "dbname"
	PostgresSslMode     = "sslmode"
	PostgresDBUser      = "user"
	PostgresPassword    = "password"
	PostgresMaxOpenConn = "max_open_connections"
	PostgresMaxIdleConn = "max_idle_connections"
)

postgres config params

View Source
const Pong = "PONG"

Variables

PostgresConfigParams : AVOID the use of same variable whenever using these constants. DON'T CHANGE THE BELOW ORDER as the parsing of GORM for line argument is not by key (yeah I know, very weird thing. TODO: test with change in order)

Functions

func GetPgConn

func GetPgConn(dbCredPath string, pgConfigKey string) *gorm.DB

GetPgConn creates the database connection and the *gorm.Db object. It doesn't set the db logger. You would need to explicity set it using db.SetLogger(<logger>)

func GetRedisConn

func GetRedisConn(redisAddrKey string) *redis.Client

GetRedisConn returns the redis.Client object. It takes a parameter redisAddrKey which is the Redis env variable key stored on the os or AWS Parameter Store. This function will try to get the value of the input key from the os or Parameter Store and create the redisClient.

Types

This section is empty.

Directories

Path Synopsis
aws
s3
ses
sqs

Jump to

Keyboard shortcuts

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