client/image_create&import: Wrap options and result

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
Paweł Gronowski
2025-10-20 20:15:04 +02:00
committed by Austin Vazquez
parent 5cc1e5f800
commit a7f409014f
13 changed files with 77 additions and 35 deletions

View File

@@ -17,3 +17,19 @@ type ImageImportOptions struct {
Changes []string // Changes are the raw changes to apply to this image
Platform string // Platform is the target platform of the image
}
// ImageImportResult holds the response body returned by the daemon for image import.
type ImageImportResult struct {
body io.ReadCloser
}
func (r ImageImportResult) Read(p []byte) (n int, err error) {
return r.body.Read(p)
}
func (r ImageImportResult) Close() error {
if r.body == nil {
return nil
}
return r.body.Close()
}