database

package
v3.8.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 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, options *options.ClientOptions) (*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
	MongoOptions *options.ClientOptions
}

Jump to

Keyboard shortcuts

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