Documentation
¶
Overview ¶
Package pagi provides utilities for implementing pagination in Go applications. It includes structures and methods for calculating page numbers, limits, and offsets based on total item counts and user-defined page sizes. This package aims to simplify the process of adding pagination to data-driven applications, ensuring efficient data retrieval and presentation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithInterceptor ¶
func WithInterceptor[T any](query T, opts ...InterceptorOption) T
Types ¶
type InterceptorOption ¶
func WithFilter ¶
func WithFilter(filterExp string, filterArgs []interface{}) InterceptorOption
func WithLimitOffset ¶
func WithLimitOffset(limit int, offset int) InterceptorOption
func WithSelect ¶
func WithSelect(selects ...string) InterceptorOption
func WithSort ¶
func WithSort(sort ...string) InterceptorOption
Click to show internal directories.
Click to hide internal directories.