Commit Graph
9 Commits
Author SHA1 Message Date
Jim 6a37c93d77 fix: properly handle rows.Err() (#4261)
* fix (auth): properly handle rows.Err()

* fix (auth/ldap): properly handle rows.Err()

* fix (auth/oidc): properly handle rows.Err()

* fix (auth/password): properly handle rows.Err()

* fix (authtoken): properly handle rows.Err()

* fix (credential): properly handle rows.Err()

* fix (credential/static): properly handle rows.Err()

* fix (credential/vault): properly handle rows.Err()

* fix (db): properly handle rows.Err()

* fix (db/schema): properly handle rows.Err()

* fix (db/migrations): properly handle rows.Err()

* fix (host): properly handle rows.Err()

* fix (host/plugin): properly handle rows.Err()

* fix (host/static): properly handle rows.Err()

* fix (iam): properly handle rows.Err()

* fix (kms): properly handle rows.Err()

* fix (oplog): properly handle rows.Err()

* fix (pagination/purge): properly handle rows.Err()

* fix (plugin): properly handle rows.Err()

* fix (job/scheduler): properly handle rows.Err()

* fix (server): properly handle rows.Err()

* fix (session): properly handle rows.Err()

* fix (target): properly handle rows.Err()
2024-01-22 14:03:40 -05:00
Johan Brandhorst-Satzkorn bf1e44afd6 internal/pagination: add notes about plugin map 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn bcddef87a2 internal/pagination: stop using unknown resource type 2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn 8175086be7 internal/pagination: avoid import cycle
The iam package is very foundational, and now depends
on the pagination package. Thus, the pagination package
must not import any packages that may import iam,
such as the plugin package. Move the plugin helpers
to a subdirectory to avoid this import cycle.
2024-01-05 07:43:21 -08:00
Johan Brandhorst-Satzkorn cb109da5b2 internal/pagination: add generic ListPlugins functions
These new methods can be used in places where the caller wants
to automatically paginate over a resource that is returned
together with a slice of plugins, such as host catalogs.
2024-01-05 07:43:20 -08:00
Johan Brandhorst-Satzkorn 97ba8b3bad internal/pagination: add generic ListPlugin functions
These new methods can be used in places where the caller wants
to automatically paginate over a resource that is returned
together with a plugin, such as plugin hosts, host sets and storage buckets.
2024-01-05 07:43:20 -08:00
Johan Brandhorst-Satzkorn 0657276a0e pagination: refactor for new pagination design
The new design defines 4 distinct functions, List, ListPage, ListRefresh
and ListRefreshPage. The first two are used during the initial
pagination, and the other two are used during refreshing.
2024-01-05 07:43:20 -08:00
Johan Brandhorst-Satzkorn 7c996d0e02 internal/pagination: add new purge package
The purge package contains a job that is used to purge
records from the foo_deleted tables when they become
older than 30 days.
2024-01-05 07:43:19 -08:00
Johan Brandhorst-Satzkorn 78541ad05e internal/pagination: add new pagination package
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.
2024-01-05 07:43:19 -08:00