mongo

package
v0.0.0-...-88f2d9e Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NotFind

func NotFind(err error) bool

check err not find

Types

type Config

type Config struct {
	URL      string
	User     string
	Password string
	Database string
}

this mongo config

type Mongo

type Mongo interface {
	GetEngine() *mongo.Database
}

this default mango

func NewMongo

func NewMongo(address, db string, options ...Option) Mongo

new mongo

type Option

type Option struct {
	// contains filtered or unexported fields
}

func MongoPassword

func MongoPassword(password string) Option

set mongodb password

func MongoUser

func MongoUser(user string) Option

set mongodb user

Jump to

Keyboard shortcuts

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