package
0.0.0-20241016230021-e9bbb9bc8e78
Repository: https://github.com/cloudflare/service.git
Documentation: pkg.go.dev
# Functions
Construct returns a Pagination fully populated.
CurrentPage returns the current page for a given offset and limit value.
LimitAndOffset returns the Limit and Offset for a given request querystring.
MaxOffset returns the maximum possible offset for a given number of pages and limit per page.
OffsetFromPage returns the offset from a page number.
PageCount returns the number of pages for a given total and items per page.
# Constants
DefaultLimit defines the default number of items per page for APIs.
DefaultOffset defines the default offset for API responses.
# Structs
Core contains the fields that encapsulate pagination of arrays.
Pagination describes an array in JSON and how to paginate the collection NOTE: You are advised to use your own strongly typed one, this one is only good for marshalling to JSON and cannot be used to marshal back to an object as it uses an interface{} for the Items.