mongo

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Default *mongo.Client //默认数据库
)

Functions

func Add

func Add(name string, option Option)

func AddMap

func AddMap(name string, setting map[string]interface{})

func AddMapBatch

func AddMapBatch(batch map[string]interface{})

func Use

func Use(name string) *mongo.Client

Types

type Option

type Option struct {
	DSN string `json:"dsn"` //数据源
}

Jump to

Keyboard shortcuts

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