Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BackendNotInitializedError = errors.New("backend not initialized") BackendTypeError = errors.New("object type is incorrect") )
Functions ¶
Types ¶
type MongoDB ¶
type MongoDB struct { Session *mgo.Session DB *mgo.Database }
MongoDB encapsulates a mongo database and session
func NewMongoDB ¶
func (*MongoDB) Close ¶
func (m *MongoDB) Close()
Close closes the mongodb session; must be called, else the session remains open
Click to show internal directories.
Click to hide internal directories.