Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection interface {
Find(query interface{}) Query
// Count() (n int, err error)
// Insert(docs ...interface{}) error
Remove(selector interface{}) error
// Update(selector interface{}, update interface{}) error
Upsert(selector interface{}, update interface{}) (*mgo.ChangeInfo, error)
}
Collection is an interface for accessing a MongoDB collection
type Database ¶
type Database interface {
C(name string) Collection
}
Database is an interface for accessing a MongoDB database
type Session ¶
type Session interface {
DB() (Database, func())
}
Session is an interface for a MongoDB session
func NewMockSession ¶
NewMockSession returns a mocked Session
func NewSession ¶
NewSession initializes a MongoDB connection to the given host
Click to show internal directories.
Click to hide internal directories.