Add Labels
to client.Image.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
parent
92d58bf8f0
commit
3d5a408bfa
6
image.go
6
image.go
@ -37,6 +37,8 @@ type Image interface {
|
|||||||
Name() string
|
Name() string
|
||||||
// Target descriptor for the image content
|
// Target descriptor for the image content
|
||||||
Target() ocispec.Descriptor
|
Target() ocispec.Descriptor
|
||||||
|
// Labels of the image
|
||||||
|
Labels() map[string]string
|
||||||
// Unpack unpacks the image's content into a snapshot
|
// Unpack unpacks the image's content into a snapshot
|
||||||
Unpack(context.Context, string) error
|
Unpack(context.Context, string) error
|
||||||
// RootFS returns the unpacked diffids that make up images rootfs.
|
// RootFS returns the unpacked diffids that make up images rootfs.
|
||||||
@ -86,6 +88,10 @@ func (i *image) Target() ocispec.Descriptor {
|
|||||||
return i.i.Target
|
return i.i.Target
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (i *image) Labels() map[string]string {
|
||||||
|
return i.i.Labels
|
||||||
|
}
|
||||||
|
|
||||||
func (i *image) RootFS(ctx context.Context) ([]digest.Digest, error) {
|
func (i *image) RootFS(ctx context.Context) ([]digest.Digest, error) {
|
||||||
provider := i.client.ContentStore()
|
provider := i.client.ContentStore()
|
||||||
return i.i.RootFS(ctx, provider, i.platform)
|
return i.i.RootFS(ctx, provider, i.platform)
|
||||||
|
Loading…
Reference in New Issue
Block a user