pagination

package
v1.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2024 License: MIT Imports: 2 Imported by: 0

README

go-common > pagination

This package contains utilities for pagination.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Normalized

type Normalized struct {
	PageIndex      int64
	PageSize       int64
	FirstItemIndex int64
	TotalItems     int64
	TotalPages     int64
}

func Normalize

func Normalize(
	totalItems int64,
	pageIndex int64,
	pageSize int64,
	minimumPageSize int64,
	defaultPageSize int64,
	maximumPageSize int64,
) *Normalized

type Result added in v1.5.0

type Result[T any] struct {
	PageIndex      int64
	PageSize       int64
	FirstItemIndex int64
	TotalItems     int64
	TotalPages     int64
	Items          []T
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL