mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
client: prepare option-structs for multiple platforms
Some methods currently support a single platform only, but we may be able to support multiple platforms. This patch prepares the option-structs for multi-platform support, but (for now) returning an error if multiple options are provided. We need a similar check on the daemon-side, but still need to check on the client, as older daemons will ignore multiple platforms, which may be unexpected. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -2,6 +2,8 @@ package client
|
||||
|
||||
import (
|
||||
"io"
|
||||
|
||||
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
)
|
||||
|
||||
// ImageImportSource holds source information for ImageImport
|
||||
@@ -12,10 +14,10 @@ type ImageImportSource struct {
|
||||
|
||||
// ImageImportOptions holds information to import images from the client host.
|
||||
type ImageImportOptions struct {
|
||||
Tag string // Tag is the name to tag this image with. This attribute is deprecated.
|
||||
Message string // Message is the message to tag the image with
|
||||
Changes []string // Changes are the raw changes to apply to this image
|
||||
Platform string // Platform is the target platform of the image
|
||||
Tag string // Tag is the name to tag this image with. This attribute is deprecated.
|
||||
Message string // Message is the message to tag the image with
|
||||
Changes []string // Changes are the raw changes to apply to this image
|
||||
Platform ocispec.Platform // Platform is the target platform of the image
|
||||
}
|
||||
|
||||
// ImageImportResult holds the response body returned by the daemon for image import.
|
||||
|
||||
Reference in New Issue
Block a user