Documentation ¶
Index ¶
Constants ¶
View Source
const ( SortAscending = 1 SortDescending = -1 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DB ¶
type DB interface { Aggregate(d rules.Queryable, pipeline interface{}) ([]bson.M, error) Count(d rules.Queryable, filter FindFilter) (int, error) DeleteMany(d rules.Queryable, q bson.M) (*mongo.DeleteResult, error) Get(d rules.Queryable, q bson.M, o *options.FindOneOptions) error GetAll(d rules.Queryable, filter FindFilter) ([]rules.Queryable, error) Insert(d rules.Queryable) (*mongo.InsertOneResult, error) InsertMany(d rules.Queryable, i []interface{}) (*mongo.InsertManyResult, error) Ping() error }
func NewMongoSession ¶
type FindFilter ¶
type FindFilter struct { Page int PerPage int Sort SortOption Query primitive.M }
type SortOption ¶
Click to show internal directories.
Click to hide internal directories.