api/types/image: move image option types to client

Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
This commit is contained in:
Austin Vazquez
2025-08-20 10:28:23 -05:00
parent 531be96bf9
commit 853aed171b
77 changed files with 512 additions and 487 deletions

View File

@@ -3,7 +3,6 @@ package client
import (
"bytes"
"github.com/moby/moby/api/types/image"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
)
@@ -50,7 +49,7 @@ func ImageInspectWithPlatform(platform *ocispec.Platform) ImageInspectOption {
}
// ImageInspectWithAPIOpts sets the API options for the image inspect operation.
func ImageInspectWithAPIOpts(opts image.InspectOptions) ImageInspectOption {
func ImageInspectWithAPIOpts(opts ImageInspectOptions) ImageInspectOption {
return imageInspectOptionFunc(func(clientOpts *imageInspectOpts) error {
clientOpts.apiOptions = opts
return nil
@@ -59,5 +58,15 @@ func ImageInspectWithAPIOpts(opts image.InspectOptions) ImageInspectOption {
type imageInspectOpts struct {
raw *bytes.Buffer
apiOptions image.InspectOptions
apiOptions ImageInspectOptions
}
type ImageInspectOptions struct {
// Manifests returns the image manifests.
Manifests bool
// Platform selects the specific platform of a multi-platform image to inspect.
//
// This option is only available for API version 1.49 and up.
Platform *ocispec.Platform
}