Updates core installed pkg summary handler for pagination. #4719
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Michael Nelson [email protected]
Description of the change
Follows on from #4694 , applying the same functionality to the core
GetInstalledPackageSummaries
handler.It does not yet work, because the dashboard client is currently assuming knowledge of the pagination token, so I need to do a separate PR for the dashboard to remove that assumption forEDIT: it ended up only requiring a 2-line change to the dashboard so I've just included it in this PR.GetInstalledPackageSummaries
, as I did earlier for the available packages in the dashboard (hence being a draft).Works to display correlated installed package summaries:
Benefits
Core pagination for multiple plugins will display installed packages in order efficiently.
Possible drawbacks
Applicable issues
Additional information
I did play a little with generics at first but couldn't yet see a useful way to re-use the functionality due to (a) small differences between the responses - available package summaries including categories, for example, and (b) the inability to define a shared interface because go doesn't let you add functions to a struct from another package (and I'm not sure whether we want to add them to the generated packages). Either way, I've left a TODO for us to do this in the future if we want.