Versions in this module Expand all Collapse all v1 v1.0.1 Aug 2, 2026 v1.0.0 Jul 23, 2026 Changes in this version + const DefaultPerPage + func EncodeCursor(c Cursor) string + func LinkHeader(base *url.URL, p Page, param string) string + func ParsePage(s string) int + func Partition[T any](items []T, keep func(T) bool) (pinned, rest []T) + func SliceSeq[T any](seq iter.Seq[T], p Page) []T + func Slice[T any](items []T, p Page) []T + type Cursor struct + Dir Direction + ID int64 + func DecodeCursor(s string) (c Cursor, ok bool) + type CursorPage struct + HasNext bool + HasPrev bool + NextCursor string + PerPage int + PrevCursor string + func NewCursorPage(perPage int, firstID, lastID int64, hasPrev, hasNext bool) CursorPage + type Direction int8 + const After + const Before + type Page struct + CurrentPage int + HasNext bool + HasPrev bool + Limit int + NextPage int + Offset int + PerPage int + PrevPage int + TotalItems int + TotalPages int + func New(total, perPage, requestedPage int) Page + func (p Page) AppendWindow(dst []WindowItem, radius int) []WindowItem + func (p Page) Window(radius int) []WindowItem + type WindowItem struct + Gap bool + Page int