mgo

package
v1.0.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoDocuments = mongo.ErrNoDocuments

ErrNoDocuments error

Functions

This section is empty.

Types

type Mongo

type Mongo struct {
	Host string
	Name string
	User string

	Collections map[string]*mongo.Collection
	Database    *mongo.Database
	URI         *url.URL
}

Mongo configurations

func New added in v1.0.6

func New(conf config.Mongo) (*Mongo, error)

New mongo instance

func (*Mongo) GetCollection added in v1.0.5

func (m *Mongo) GetCollection(key string) *mongo.Collection

func (*Mongo) Ping

func (m *Mongo) Ping() (err error)

Ping mongo

Jump to

Keyboard shortcuts

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