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:
Daniel Nephin 2016-10-03 15:17:39 -04:00
parent 671fe5c051
commit a6a247fdf9
3 changed files with 4 additions and 4 deletions

View File

@ -10,8 +10,8 @@ import (
) )
// ImageList returns a list of images in the docker host. // ImageList returns a list of images in the docker host.
func (cli *Client) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.Image, error) { func (cli *Client) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error) {
var images []types.Image var images []types.ImageSummary
query := url.Values{} query := url.Values{}
if options.Filters.Len() > 0 { if options.Filters.Len() > 0 {

View File

@ -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) 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", ID: "image_id2",
}, },

View File

@ -71,7 +71,7 @@ type ImageAPIClient interface {
ImageHistory(ctx context.Context, image string) ([]types.ImageHistory, error) ImageHistory(ctx context.Context, image string) ([]types.ImageHistory, error)
ImageImport(ctx context.Context, source types.ImageImportSource, ref string, options types.ImageImportOptions) (io.ReadCloser, 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) 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) ImageLoad(ctx context.Context, input io.Reader, quiet bool) (types.ImageLoadResponse, error)
ImagePull(ctx context.Context, ref string, options types.ImagePullOptions) (io.ReadCloser, 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) ImagePush(ctx context.Context, ref string, options types.ImagePushOptions) (io.ReadCloser, error)