Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Global config Config *MongoConfig // Global mgo Session Session *mgo.Session // Global mgo Database Database *mgo.Database // Optimization: Stores the method to call in mgoSessionDupl so that it only // has to be looked up once (or whenever Session changes) Duplicate func() *mgo.Session )
Functions ¶
Types ¶
type MongoConfig ¶
type MongoController ¶
type MongoController struct { *revel.Controller MongoSession *mgo.Session }
func (*MongoController) Begin ¶
func (m *MongoController) Begin() revel.Result
Connect to mgo if we haven't already and return a copy/new/clone of the session
func (*MongoController) End ¶
func (m *MongoController) End() revel.Result
Close the controller session if we have an active one.
Click to show internal directories.
Click to hide internal directories.