mongo

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity struct {
	DB      *mgo.Database
	Session *mgo.Session
}

func Connect

func Connect(mongoConfig mongoconfig.Config) (*Entity, error)

InitMongoDB creates a connection to MongoDB using the provided mongo config. Returns pointers to the MongoDB object, and the open session to it. (Mongo) -> (*MongoDatabase, *Session)

func (*Entity) Close

func (e *Entity) Close()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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