You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
599 B
Go
19 lines
599 B
Go
//go:generate mockgen -package internal -destination collection_mock.go -source collection.go
|
|
|
|
package internal
|
|
|
|
import "github.com/globalsign/mgo"
|
|
|
|
type MgoCollection interface {
|
|
Find(query interface{}) *mgo.Query
|
|
FindId(id interface{}) *mgo.Query
|
|
Insert(docs ...interface{}) error
|
|
Pipe(pipeline interface{}) *mgo.Pipe
|
|
Remove(selector interface{}) error
|
|
RemoveAll(selector interface{}) (*mgo.ChangeInfo, error)
|
|
RemoveId(id interface{}) error
|
|
Update(selector, update interface{}) error
|
|
UpdateId(id, update interface{}) error
|
|
Upsert(selector, update interface{}) (*mgo.ChangeInfo, error)
|
|
}
|