doc/proposal: pagination updates
This commit is contained in:
parent
8798f22fec
commit
f649c13504
@ -283,8 +283,13 @@ type LockListRequest struct {
|
|||||||
// Value is the value that the property must take.
|
// Value is the value that the property must take.
|
||||||
Value string `json:"value"`
|
Value string `json:"value"`
|
||||||
} `json:"filters"`
|
} `json:"filters"`
|
||||||
// Page is the numerical page of the result set to return.
|
// Cursor is an optional field used to tell the server which lock was
|
||||||
Page int `json:"page"`
|
// seen last, if scanning through multiple pages of results.
|
||||||
|
//
|
||||||
|
// Servers must return a list of locks sorted in reverse chronological
|
||||||
|
// order, so the Cursor provides a consistent method of viewing all
|
||||||
|
// locks, even if more were created between two requests.
|
||||||
|
Cursor string `json:"cursor,omitempty"`
|
||||||
// Limit is the maximum number of locks to return in a single page.
|
// Limit is the maximum number of locks to return in a single page.
|
||||||
Limit int `json:"limit"`
|
Limit int `json:"limit"`
|
||||||
}
|
}
|
||||||
@ -298,9 +303,10 @@ type LockList struct {
|
|||||||
// from a given query, then `Locks` will be represented as an empty
|
// from a given query, then `Locks` will be represented as an empty
|
||||||
// array.
|
// array.
|
||||||
Locks []Lock `json:"locks"`
|
Locks []Lock `json:"locks"`
|
||||||
// HasMore represents whether or not the server has more information to
|
// NextCursor returns the Id of the Lock the client should update its
|
||||||
// return against the given query.
|
// cursor to, if there are multiple pages of results for a particular
|
||||||
HasMore bool `json:"has_more"`
|
// `LockListRequest`.
|
||||||
|
NextCursor string `json:"next_cursor,omitempty"`
|
||||||
// Err populates any error that was encountered during the search. If no
|
// Err populates any error that was encountered during the search. If no
|
||||||
// error was encountered and the operation was succesful, then a value
|
// error was encountered and the operation was succesful, then a value
|
||||||
// of nil will be passed here.
|
// of nil will be passed here.
|
||||||
|
Loading…
Reference in New Issue
Block a user