api/types: move Version to api/types/system

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-10-31 01:44:19 +01:00
parent f6ee11fe60
commit 12c9de37e9
11 changed files with 140 additions and 82 deletions

View File

@@ -4,7 +4,7 @@ import (
"context"
"encoding/json"
"github.com/moby/moby/api/types"
"github.com/moby/moby/api/types/system"
)
// ServerVersionOptions specifies options for the server version request.
@@ -41,7 +41,7 @@ type ServerVersionResult struct {
// Components contains version information for the components making
// up the server. Information in this field is for informational
// purposes, and not part of the API contract.
Components []types.ComponentVersion
Components []system.ComponentVersion
}
// PlatformInfo holds information about the platform (product name) the
@@ -60,7 +60,7 @@ func (cli *Client) ServerVersion(ctx context.Context, _ ServerVersionOptions) (S
return ServerVersionResult{}, err
}
var v types.Version
var v system.VersionResponse
err = json.NewDecoder(resp.Body).Decode(&v)
if err != nil {
return ServerVersionResult{}, err