Rename types.Image.Manifest to types.Image.Inspect

Does not change behavior.

This better expresses the purpose of this method (it is working with
more, currently much more, than the manifest), and frees up the Manifest
method name for a simple getter of the raw blob.
This commit is contained in:
Miloslav Trmač 2016-05-16 20:06:12 +02:00
parent d4eb69e1ab
commit dc7a05ebf9
3 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ var inspectCmd = cli.Command{
fmt.Println(string(b))
return
}
imgInspect, err := img.Manifest()
imgInspect, err := img.Inspect()
if err != nil {
logrus.Fatal(err)
}

View File

@ -62,7 +62,7 @@ func (i *dockerImage) GetSignatures() ([][]byte, error) {
return i.cachedSignatures, nil
}
func (i *dockerImage) Manifest() (types.ImageManifest, error) {
func (i *dockerImage) Inspect() (types.ImageManifest, error) {
// TODO(runcom): unused version param for now, default to docker v2-1
m, err := i.getSchema1Manifest()
if err != nil {

View File

@ -60,7 +60,7 @@ type Image interface {
// GetSignatures is like ImageSource.GetSignatures, but the result is cached; it is OK to call this however often you need.
GetSignatures() ([][]byte, error)
Layers(layers ...string) error // configure download directory? Call it DownloadLayers?
Manifest() (ImageManifest, error)
Inspect() (ImageManifest, error)
DockerTar() ([]byte, error) // ??? also, configure output directory
}