mongo

package
v6.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateIndexes

func CreateIndexes(ctx context.Context, cli *mongo.Client) error

CreateIndexes 创建索引

func NewClient

func NewClient(cfg *Config) (*mongo.Client, func(), error)

NewClient 创建mongo客户端实例

Types

type Config

type Config struct {
	URI      string
	Database string
	Timeout  time.Duration
}

Config 配置参数

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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