HistoryCursor¶
- class gafaelfawr.models.history.HistoryCursor(time, id, previous=False)¶
Bases:
object
Pagination cursor for history entries.
Attributes Summary
Whether to search backwards instead of forwards.
Methods Summary
from_str
(cursor)Build cursor from the string serialization form.
invert
(cursor)Return the inverted cursor (going the opposite direction).
Attributes Documentation
Methods Documentation
- classmethod from_str(cursor)¶
Build cursor from the string serialization form.
- Parameters:
cursor (
str
) – Serialized form of the cursor.- Returns:
The cursor represented as an object.
- Return type:
- Raises:
InvalidCursorError – Raised if the cursor is not valid.
- classmethod invert(cursor)¶
Return the inverted cursor (going the opposite direction).
- Parameters:
cursor (
HistoryCursor
) – Cursor to invert.- Returns:
The inverted cursor.
- Return type: