Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultLimit int = 20 MaxLimit int = 100 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct {
// Cursor is unique identifier (ULID) of the last item from the previous page.
// If empty, it includes the first page
Cursor types.ID `json:"cursor"`
// Limit specifies how many items to fetch.
Limit int `json:"limit"`
}
Request represents the structure for cursor-based pagination requests.
func (*Request) BasicValidation ¶
BasicValidation ensures the request parameters are within valid ranges.
type Response ¶
type Response struct {
// Next Counter is the ID of the last item in the current list.
// The client should user this as the `cursor` for the next request.
NextCursor types.ID `json:"next_cursor"`
// HasMore indicates if there are mote item available to fetch.
HasMore bool `json:"has_more"`
}
Response represents the structure for cursor-based pagination responses.
Click to show internal directories.
Click to hide internal directories.