Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

draft: sessions list pagination #3916

Closed

Conversation

mikemountain
Copy link
Collaborator

No description provided.

Creates a new foo_deleted table for each subtype of each
resource that needs to support pagination. The deleted
tables are used to track deletions of resources and return
them to users of the new pagination API. We track only the
ID and delete_time of the resource, so there's no way to
filter out resources that the user could not see before it
was deleted. This is intentional to keep the design simple
and is not considered a security issue.
The Now() method returns the current transaction timestamp.
@johanbrandhorst johanbrandhorst force-pushed the jbrandhorst-target-handler-pagination branch from 233ea61 to 72adacd Compare October 28, 2023 02:46
The resource type method is used to automatically
create refresh tokens from a resource when that
resource is the last item returned in a page.

This also renames the iam domain ResourceType method
to GetResourceType to align with the new method.
The refreshtoken package encapsulates domain logic surrouding
the refresh token. A refresh token is used both for
paginating through a collection and for requesting any
updates to that collection.
The pagination package provides generic functions for
iterating over a collection of items such that each incoming
request is filled even after filtering is applied.
The purge package contains a job that is used to purge
records from the foo_deleted tables when they become
older than 30 days.
The new GrantsHash method can be used to track changes
to a users grants across requests.
The ListRefreshToken type is used, in its marshalled form,
for pagination requests. A new refresh token is returned
which each invocation of a list method (unless
there was no input refresh token and there were no results).
Helpers for parsing, marshalling and converting types
to domain types.
Adds pagination support to the target domain
@johanbrandhorst johanbrandhorst force-pushed the jbrandhorst-target-handler-pagination branch from 72adacd to f327e2b Compare October 30, 2023 17:18
@johanbrandhorst johanbrandhorst force-pushed the jbrandhorst-target-handler-pagination branch from f327e2b to f98c592 Compare October 30, 2023 17:25
@johanbrandhorst johanbrandhorst force-pushed the jbrandhorst-target-handler-pagination branch from f98c592 to 9b09518 Compare October 30, 2023 17:37
The max_page_size variable lets operators control the size of the
pagination pages. This value configures both the maximum permitted
page size and the default page size when none is explicitly provided.

Operators can tweak this option up or down to increase or reduce
the load on the database during pagination.
Updates all List endpoints to automatically paginate
through results to preserve backwards compatibility.
Adding support for user controllable pagination could
be considered at a later time.
@johanbrandhorst johanbrandhorst force-pushed the jbrandhorst-target-handler-pagination branch from 9b09518 to 5a14945 Compare October 30, 2023 17:45
@mikemountain mikemountain force-pushed the mikemountain-sessions-list-pagination branch from 149e9b2 to 6ab6046 Compare October 30, 2023 20:02
@johanbrandhorst johanbrandhorst force-pushed the jbrandhorst-target-handler-pagination branch from af7061f to 85b9651 Compare November 7, 2023 17:54
Base automatically changed from jbrandhorst-target-handler-pagination to llb-list-pagination-2 November 7, 2023 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants