Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeInfo ¶
type ChangeInfo struct {
*mgo.ChangeInfo
}
ChangeInfo it's an embedded type of mgo.ChangeInfo, made to reduce importing to this package only, since it's necessary on other functions.
func NewChangeInfo ¶
func NewChangeInfo(u, r, m int, id interface{}) (c *ChangeInfo)
NewChangeInfo creates a new embedded ChangeInfo, with all attributes for class.
func NewRemoveInfo ¶
func NewRemoveInfo(r int) (c *ChangeInfo)
NewRemoveInfo creates a new embedded ChangeInfo, with all attributes returned on calls to Remove.
type Collectioner ¶
type Collectioner interface { Bulk() *mgo.Bulk Count() (int, error) Create(*mgo.CollectionInfo) error DropCollection() error DropIndex(...string) error DropIndexName(string) error EnsureIndex(mgo.Index) error EnsureIndexKey(...string) error Find(interface{}) Querier FindID(interface{}) Querier Indexes() ([]mgo.Index, error) Insert(docs ...interface{}) error NewIter(*mgo.Session, []bson.Raw, int64, error) *mgo.Iter Pipe(interface{}) *mgo.Pipe Remove(interface{}) error RemoveAll(interface{}) (*ChangeInfo, error) RemoveID(interface{}) error Repair() *mgo.Iter Update(interface{}, interface{}) error UpdateAll(interface{}, interface{}) (*ChangeInfo, error) UpdateID(interface{}, interface{}) error Upsert(interface{}, interface{}) (*ChangeInfo, error) UpsertID(interface{}, interface{}) (*ChangeInfo, error) With(*mgo.Session) Collectioner }
Collectioner is the interface that tries to enumerate all methods that mgo.Collection have, with the difference of using the interfaces on this package, instead of mgo.Collection, mgo.Database and mgo.Query.
type Databaser ¶
type Databaser interface { AddUser(string, string, bool) error C(string) Collectioner CollectionNames() ([]string, error) DropDatabase() error FindRef(*mgo.DBRef) Querier GridFS(string) *mgo.GridFS Login(string, string) error Logout() RemoveUser(string) error Run(interface{}, interface{}) error UpsertUser(*mgo.User) error With(*mgo.Session) Databaser }
Databaser is the interface that tries to enumerate all methods that mgo.Database have, with the difference of using the interfaces on this package, instead of mgo.Collection, mgo.Database and mgo.Query.
type DialInfo ¶ added in v0.8.0
DialInfo it's an embedded type of mgo.DialInfo, made to reduce importing to this package only, since it's necessary on other functions.
func NewDatabaseInfo ¶ added in v0.8.0
NewDatabaseInfo creates a new simplified DialInfo, with only Database attribute set.
func NewDialInfo ¶ added in v0.8.0
NewDialInfo creates a new embedded DialInfo, with all attributes for class.
type Querier ¶
type Querier interface { All(interface{}) error Apply(mgo.Change, interface{}) (*mgo.ChangeInfo, error) Batch(int) Querier Comment(string) Querier Count() (int, error) Distinct(string, interface{}) error Explain(interface{}) error For(interface{}, func() error) error Hint(...string) Querier Iter() *mgo.Iter Limit(int) Querier LogReplay() Querier MapReduce(*mgo.MapReduce, interface{}) (*mgo.MapReduceInfo, error) One(interface{}) error Prefetch(float64) Querier Select(interface{}) Querier SetMaxScan(int) Querier SetMaxTime(time.Duration) Querier Skip(int) Querier Snapshot() Querier Sort(...string) Querier Tail(time.Duration) *mgo.Iter }
Querier is the interface that tries to enumerate all methods that mgo.Query have, with the difference of using the interfaces on this package, instead of mgo.Collection, mgo.Database and mgo.Query.