mongo

package
v0.0.0-...-752a2b9 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mongodb

type Mongodb struct {
	Uri        string //数据库网络地址
	Database   string //要连接的数据库
	Collection string //要连接的集合
	Handle     *mongo.Collection
	Client     *mongo.Client
	Duration   time.Duration
}

func (*Mongodb) Connection

func (MG *Mongodb) Connection(ctx context.Context, duration time.Duration)

type Query

type Query struct {
	Client *mongo.Collection
}

func (*Query) Builder

func (q *Query) Builder(ctx context.Context, db *Mongodb, duration time.Duration)

Jump to

Keyboard shortcuts

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