package
Version:
v0.0.0-...-1f1dc5f
Opens a new window with list of versions in this module.
Published: Jun 30, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package pagination normalizes bounded offset pagination.
ErrInvalid reports invalid or overflowing pagination input.
Bounds converts validated offset pagination into safe slice indexes.
type Options struct {
DefaultPageSize int
MaxPageSize int
}
Options defines the pagination policy for one list endpoint.
type Window struct {
Page int
PageSize int
Offset int
Limit int
}
Window is a validated page request translated into store-facing bounds.
Normalize applies defaults, validates bounds, and rejects offset overflow.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.