Documentation
¶
Overview ¶
Package listpage pages a list call's results by offset. The page token is the unpadded base64url encoding of the decimal offset of the page's first item, so a token from an older run still decodes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeOffset ¶
DecodeOffset returns the offset token holds, 0 for "". A token that is not one EncodeOffset made, or holds a negative offset, is INVALID_ARGUMENT.
func EncodeOffset ¶
EncodeOffset returns the page token for offset n.
Types ¶
type Options ¶
type Options struct {
// Max is the largest page size, and the size when page_size is 0.
Max int
// Strict refuses a negative page_size and a token past the end of the
// list as INVALID_ARGUMENT. Otherwise a negative page_size is Max and a
// token past the end gives an empty last page.
Strict bool
}
Options sets how a Service pages.