pagination

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchAll

func FetchAll[T any](fetchPage FetchPage[T]) ([]T, error)

FetchAll repeatedly calls fetchPage, accumulating all items until there are no more pages. This provides kubectl-style chunk-based pagination that is transparent to the user.

Types

type FetchPage

type FetchPage[T any] func(limit int, cursor string) (items []T, nextCursor string, err error)

FetchPage fetches one page given limit and cursor. Returns items, next cursor (empty string when done), and error.

Jump to

Keyboard shortcuts

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