api, client: don't use a pointer-slice for plugins

The backend and router don't use a pointer-slice (the server actually
doesn't use the `plugin.ListResponse` type and a straight slice);
778e5bfad3/daemon/server/router/plugin/backend.go (L20)
6baf274fa3/daemon/server/router/plugin/plugin_routes.go (L276-L280)

Align the type in the API to match, and update the type defined in the
client accordingly.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-11-07 19:31:00 +01:00
parent 4dc87c55c7
commit 15a048c396
5 changed files with 5 additions and 5 deletions

View File

@@ -5,7 +5,7 @@ import (
)
// ListResponse contains the response for the Engine API
type ListResponse []*Plugin
type ListResponse []Plugin
// Privilege describes a permission the user has to accept
// upon installing a plugin.

View File

@@ -15,7 +15,7 @@ type PluginListOptions struct {
// PluginListResult represents the result of a plugin list operation.
type PluginListResult struct {
Items []*plugin.Plugin
Items []plugin.Plugin
}
// PluginList returns the installed plugins

View File

@@ -64,7 +64,7 @@ func TestPluginList(t *testing.T) {
return nil, fmt.Errorf("%s not set in URL query properly. Expected '%s', got %s", key, expected, actual)
}
}
return mockJSONResponse(http.StatusOK, nil, []*plugin.Plugin{
return mockJSONResponse(http.StatusOK, nil, []plugin.Plugin{
{ID: "plugin_id1"},
{ID: "plugin_id2"},
})(req)

View File

@@ -5,7 +5,7 @@ import (
)
// ListResponse contains the response for the Engine API
type ListResponse []*Plugin
type ListResponse []Plugin
// Privilege describes a permission the user has to accept
// upon installing a plugin.

View File

@@ -15,7 +15,7 @@ type PluginListOptions struct {
// PluginListResult represents the result of a plugin list operation.
type PluginListResult struct {
Items []*plugin.Plugin
Items []plugin.Plugin
}
// PluginList returns the installed plugins