mongo

package
v0.0.0-...-7c4d03a Latest Latest
Warning

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

Go to latest
Published: May 11, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MgoClient

type MgoClient struct {
	DBName string
	URL    string
	// contains filtered or unexported fields
}

MgoClient mongo client

func NewMongoClient

func NewMongoClient(url, dbName string) *MgoClient

NewMongoClient new mongo client

func (*MgoClient) CollectExists

func (client *MgoClient) CollectExists(db *mgo.Database, collectName string) bool

CollectExists Returns true if the collection exists.

func (*MgoClient) Session

func (client *MgoClient) Session() (*mgo.Session, error)

Session session

Jump to

Keyboard shortcuts

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