Versions in this module Expand all Collapse all v1 v1.2.0 Mar 17, 2024 Changes in this version + type Config struct + CacheAdapter *gocache.AdapterInterface + CustomParamEnabled bool + DefaultSize int64 + ErrorEnabled bool + FieldSelectorEnabled bool + FieldWrapper string + FieldsParams []string + FilterParams []string + JSONMarshal func(v interface{}) ([]byte, error) + JSONUnmarshal func(data []byte, v interface{}) error + Operator string + OrderParams []string + PageParams []string + SizeParams []string + SmartSearch bool + SortParams []string + Statement *gorm.Statement + ValueWrapper string + type Page struct + Error bool + ErrorMessage string + First bool + Items *[]T + Last bool + MaxPage int64 + Page int64 + RawError error + Size int64 + Total int64 + TotalPages int64 + Visible int64 + type Pagination struct + Config *Config + func New[T any](params ...interface{}) *Pagination[T] + func (p *Pagination[T]) Response(stmt *gorm.DB, req interface{}, res *[]T) Page[T] + func (p *Pagination[T]) With(stmt *gorm.DB) RequestContext[T] + func (p Pagination[T]) ClearAllCache() + func (p Pagination[T]) ClearCache(keyPrefixes ...string) + type RequestContext interface + Request func(interface{}) ResponseContext[T] + type ResponseContext interface + Cache func(string) ResponseContext[T] + Fields func([]string) ResponseContext[T] + Response func(*[]T) Page[T]