database

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ctx context.Context, config Config) (interface{}, error)

func InitMongoDB

func InitMongoDB(ctx context.Context, source string) (*mongo.Client, error)

func InitPostgresql

func InitPostgresql(driver string, source string) (*sql.DB, error)

func InitRedis

func InitRedis(ctx context.Context, address string, password string, db string) (*redis.Client, error)

Types

type Config

type Config struct {
	Driver   string
	Source   string
	Host     string
	Password string
	Db       string
}

Jump to

Keyboard shortcuts

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