Versions in this module Expand all Collapse all v0 v0.0.1 Feb 24, 2023 Changes in this version + type IAdapter interface + Length func() (int64, error) + Slice func(offset, length int64, dest any) error + type IPaginator interface + Clear func() + Get func(dest any) error + GetCurrentPage func() int64 + GetDestItems func(dest any) any + GetLastPage func() (int64, error) + GetListRows func() int64 + GetResult func(dest any) *Result + GetTotal func() (int64, error) + HasPages func() bool + SetCurrentPage func(currentPage int64) + SetDestItems func(dest any) + func Make(adapter IAdapter, listRows int64, currentPage int64, total int64, simple bool, ...) IPaginator + func SimplePaginator(adapter IAdapter, listRows, currentPage int64) IPaginator + func TotalPaginator(adapter IAdapter, listRows, currentPage, total int64) IPaginator + type Options struct + Fragment string + Path string + Query map[string]string + VarPage string + func DefaultOptions() Options + type Paginator struct + CurrentPage int64 + DestItems any + HasMore bool + IAdapter IAdapter + LastPage int64 + ListRows int64 + Options Options + Simple bool + Total int64 + func (p *Paginator) Get(dest any) error + func (p *Paginator) GetCurrentPage() int64 + func (p *Paginator) GetDestItems(dest any) any + func (p *Paginator) GetLastPage() (int64, error) + func (p *Paginator) GetListRows() int64 + func (p *Paginator) GetResult(dest any) *Result + func (p *Paginator) GetTotal() (int64, error) + func (p *Paginator) HasPages() bool + func (p *Paginator) SetCurrentPage(currentPage int64) + func (p *Paginator) SetDestItems(dest any) + func (p Paginator) Clear() + type Result struct + CurrentPage int64 + Data any + LastPage int64 + PerPage int64 + Total int64