Versions in this module Expand all Collapse all v0 v0.0.3 Mar 2, 2021 Changes in this version + const FilterInAggregateError + const NilFilterError + const PageLimitError + func Paging(p *pagingQuery, paginationInfo chan<- *Paginator, aggregate bool, ...) + type AutoGenerated struct + Data []bson.Raw + Total []struct{ ... } + type PaginatedData struct + Data []bson.Raw + Pagination PaginationData + type PaginationData struct + Next int64 + Page int64 + PerPage int64 + Prev int64 + Total int64 + TotalPage int64 + type Paginator struct + Limit int64 + NextPage int64 + Offset int64 + Page int64 + PrevPage int64 + TotalPage int64 + TotalRecord int64 + func (p *Paginator) PaginationData() *PaginationData + type PagingQuery interface + Aggregate func(ctx context.Context, criteria ...interface{}) (paginatedData *PaginatedData, err error) + Filter func(selector interface{}) PagingQuery + Find func(ctx context.Context) (paginatedData *PaginatedData, err error) + Limit func(limit int64) PagingQuery + Page func(page int64) PagingQuery + Select func(selector interface{}) PagingQuery + Sort func(sortField string, sortValue int) PagingQuery + func New(collection *mongo.Collection) PagingQuery