Documentation
¶
Index ¶
Constants ¶
View Source
const ResultKind = "PageInfo"
ResultKind represents the result object kind.
Variables ¶
This section is empty.
Functions ¶
func CalculatePageSize ¶
func CalculatePageSize(c Calculation) int
CalculatePageSize calculates the desired page size for paginated queries.
Types ¶
type Calculation ¶
type Calculation struct {
// GotItems is how many items we currently have received.
GotItems int
// MaxItems is how many items we want in total.
MaxItems int
// MaxPageSize is the maximum number of items we want to query for per request.
MaxPageSize int
}
Calculation contains all the info needed to calculate a request's page size.
type Result ¶
type Result struct {
Kind string `json:"kind"`
Message string `json:"message"`
NextPageToken Token `json:"next_page_token"`
FullCommand string `json:"full_command"`
}
Result is a printable object that shows the pagination kind. Implements the types.Object interface as a noop.
func (*Result) Description ¶
Description returns an empty description.
func (*Result) Identifier ¶
Identifier returns an empty identifier.
Click to show internal directories.
Click to hide internal directories.