Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultPaginationLimit = 1000
Variables ¶
View Source
var ErrInvalidCursor = errors.New("invalid pagination cursor")
View Source
var ErrInvalidLimit = errors.New("limit cannot be negative")
View Source
var ErrMixedPagination = errors.New(
"cannot mix forward pagination (first, after) with backward pagination (last, before)")
Functions ¶
func ComputePage ¶
func ComputePage( first *int, last *int, after *string, before *string, total int, ) (offset int, limit int, err error)
Compute the pagination parameters given the GraphQL connection parameters.
func ConfigureLog ¶
func DecodeCursor ¶
Decode the integer offset from a base64 string.
func EncodeCursor ¶
Encode the integer offset into a base64 string.
Types ¶
type PageResult ¶
Click to show internal directories.
Click to hide internal directories.