Merge pull request #3874 from crosbymichael/image-meta

Return the underlying images metadata
This commit is contained in:
Maksym Pavlenko 2019-12-04 11:15:02 -08:00 committed by GitHub
commit 640ca7812f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,6 +58,8 @@ type Image interface {
IsUnpacked(context.Context, string) (bool, error) IsUnpacked(context.Context, string) (bool, error)
// ContentStore provides a content store which contains image blob data // ContentStore provides a content store which contains image blob data
ContentStore() content.Store ContentStore() content.Store
// Metadata returns the underlying image metadata
Metadata() images.Image
} }
type usageOptions struct { type usageOptions struct {
@ -130,6 +132,10 @@ type image struct {
platform platforms.MatchComparer platform platforms.MatchComparer
} }
func (i *image) Metadata() images.Image {
return i.i
}
func (i *image) Name() string { func (i *image) Name() string {
return i.i.Name return i.i.Name
} }