mongo

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Creator

func Creator(cfg interface{}) (interface{}, error)

Types

type MongoConfig

type MongoConfig struct {
	Addresses []string
	UserName  string
	Password  string
	Database  string
}

type MongoDB

type MongoDB struct {
	Config *MongoConfig
	Mgo    *mgo.Database
}

func NewMongoDB

func NewMongoDB(cfg *MongoConfig) (db *MongoDB, err error)

func (*MongoDB) Get

func (this *MongoDB) Get(write bool) *mgo.Database

Jump to

Keyboard shortcuts

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