Create interface that clients that talk to the api must fulfill.
Signed-off-by: David Calavera <david.calavera@gmail.com> Upstream-commit: 8b15839ee85b291266d07f97d9ad6ca0326d1339 Component: engine
This commit is contained in:
@ -3,21 +3,13 @@ package lib
|
||||
import (
|
||||
"io"
|
||||
"net/url"
|
||||
|
||||
"github.com/docker/docker/api/types"
|
||||
)
|
||||
|
||||
// CreateImageOptions holds information to create images.
|
||||
type CreateImageOptions struct {
|
||||
// Parent is the image to create this image from
|
||||
Parent string
|
||||
// Tag is the name to tag this image
|
||||
Tag string
|
||||
// RegistryAuth is the base64 encoded credentials for this server
|
||||
RegistryAuth string
|
||||
}
|
||||
|
||||
// CreateImage creates a new image based in the parent options.
|
||||
// ImageCreate creates a new image based in the parent options.
|
||||
// It returns the JSON content in the response body.
|
||||
func (cli *Client) CreateImage(options CreateImageOptions) (io.ReadCloser, error) {
|
||||
func (cli *Client) ImageCreate(options types.ImageCreateOptions) (io.ReadCloser, error) {
|
||||
var query url.Values
|
||||
query.Set("fromImage", options.Parent)
|
||||
query.Set("tag", options.Tag)
|
||||
|
||||
Reference in New Issue
Block a user