Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbHelper ¶
type DbHelper struct {
// contains filtered or unexported fields
}
DbHelper is a convenience helper for systems that work with a single mongo DB. It creates a 'master' session, given the mgo url/db and init options and then uses its copies for db operations.
func Dial ¶
func Dial(dialInfo *mgo.DialInfo, opts *DbHelperInitOptions) (d *DbHelper, err error)
Dial connects to the db using specified options and returns helper or error if dial fails.
func (*DbHelper) C ¶
C is a shortcut for getting a collection+session (master session copy) by name inside current database
type DbHelperInitOptions ¶
DbHelperInitOptions contain initialization options for DbHelper constructor.
Click to show internal directories.
Click to hide internal directories.