mirror of
https://github.com/moby/moby.git
synced 2026-01-11 10:41:43 +00:00
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>
22 lines
643 B
Go
22 lines
643 B
Go
package client
|
|
|
|
import (
|
|
"io"
|
|
|
|
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
|
)
|
|
|
|
// ImageCreateOptions holds information to create images.
|
|
type ImageCreateOptions struct {
|
|
RegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry.
|
|
// Platforms specifies the platforms to platform of the image if it needs
|
|
// to be pulled from the registry. Multiple platforms can be provided
|
|
// if the daemon supports multi-platform pulls.
|
|
Platforms []ocispec.Platform
|
|
}
|
|
|
|
// ImageCreateResult holds the response body returned by the daemon for image create.
|
|
type ImageCreateResult struct {
|
|
Body io.ReadCloser
|
|
}
|