Versions in this module Expand all Collapse all v1 v1.0.2 Sep 6, 2023 Changes in this version + const DecodeEmptyError + const DecodeNotAvail + 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(criteria ...interface{}) (paginatedData *PaginatedData, err error) + Context func(ctx context.Context) PagingQuery + Decode func(decode interface{}) PagingQuery + Filter func(selector interface{}) PagingQuery + Find func() (paginatedData *PaginatedData, err error) + Limit func(limit int64) PagingQuery + Page func(page int64) PagingQuery + Select func(selector interface{}) PagingQuery + SetCollation func(ctx *options.Collation) PagingQuery + Sort func(sortField string, sortValue interface{}) PagingQuery + TotalCount func(total int64) PagingQuery + func New(collection *mongo.Collection) PagingQuery