package
Version:
v1.7.0
Opens a new window with list of versions in this module.
Published: May 25, 2026
License: MIT
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 provides generic pagination utilities for cloudemu services.
EncodeToken encodes pagination state into a base64 string.
type Page[T any] struct {
Items []T
NextPageToken string
HasMore bool
}
Page represents a page of results.
Paginate paginates a slice of items given a page token and max results per page.
type PageToken struct {
Offset int `json:"offset"`
}
PageToken holds pagination state.
DecodeToken decodes a page token string into pagination state.
Returns offset 0 for empty tokens.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.