major

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DsMetaIdDatabaseRW = "metanetRW"
)

Variables

This section is empty.

Functions

func GetDBWith

func GetDBWith(dbName string) (*mongo.Client, error)

func GetMetaIdReadDB

func GetMetaIdReadDB() (*mongo.Client, error)

func GetMetaIdReadWriteDB

func GetMetaIdReadWriteDB() (*mongo.Client, error)

func InitMongoDB

func InitMongoDB(configPath string)

Types

type Database

type Database struct {
	MongoClientMap map[string]*mongo.Client
}
var DB *Database

type MGOConfig

type MGOConfig struct {
	DsName    string
	Addrs     string
	Timeout   int64
	Database  string
	Username  string
	Password  string
	PoolLimit int
}

Jump to

Keyboard shortcuts

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