mirror of https://github.com/docker/cli.git
Generate api/types:Image from the swagger spec
and rename it to a more appropriate name ImageSummary. Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
671fe5c051
commit
a6a247fdf9
|
@ -10,8 +10,8 @@ import (
|
|||
)
|
||||
|
||||
// ImageList returns a list of images in the docker host.
|
||||
func (cli *Client) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.Image, error) {
|
||||
var images []types.Image
|
||||
func (cli *Client) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error) {
|
||||
var images []types.ImageSummary
|
||||
query := url.Values{}
|
||||
|
||||
if options.Filters.Len() > 0 {
|
||||
|
|
|
@ -93,7 +93,7 @@ func TestImageList(t *testing.T) {
|
|||
return nil, fmt.Errorf("%s not set in URL query properly. Expected '%s', got %s", key, expected, actual)
|
||||
}
|
||||
}
|
||||
content, err := json.Marshal([]types.Image{
|
||||
content, err := json.Marshal([]types.ImageSummary{
|
||||
{
|
||||
ID: "image_id2",
|
||||
},
|
||||
|
|
|
@ -71,7 +71,7 @@ type ImageAPIClient interface {
|
|||
ImageHistory(ctx context.Context, image string) ([]types.ImageHistory, error)
|
||||
ImageImport(ctx context.Context, source types.ImageImportSource, ref string, options types.ImageImportOptions) (io.ReadCloser, error)
|
||||
ImageInspectWithRaw(ctx context.Context, image string) (types.ImageInspect, []byte, error)
|
||||
ImageList(ctx context.Context, options types.ImageListOptions) ([]types.Image, error)
|
||||
ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error)
|
||||
ImageLoad(ctx context.Context, input io.Reader, quiet bool) (types.ImageLoadResponse, error)
|
||||
ImagePull(ctx context.Context, ref string, options types.ImagePullOptions) (io.ReadCloser, error)
|
||||
ImagePush(ctx context.Context, ref string, options types.ImagePushOptions) (io.ReadCloser, error)
|
||||
|
|
Loading…
Reference in New Issue