mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
api/types/image: move image option types to client
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user