better name and updated tests

- use ManifestDigests name instead of Indexes
- update tests to validate against multiple tags

Signed-off-by: Manish Tomar <manish.tomar@docker.com>
This commit is contained in:
Manish Tomar 2018-11-01 10:31:08 -07:00
parent 9ebf151ac2
commit 1251e51ad0
3 changed files with 44 additions and 20 deletions

11
tags.go
View file

@ -28,9 +28,10 @@ type TagService interface {
Lookup(ctx context.Context, digest Descriptor) ([]string, error)
}
// TagIndexes proves method to retreive all the digests that a tag historically pointed to
type TagIndexes interface {
// Indexes returns set of digests that this tag historically pointed to. This also includes
// currently linked digest. There is no ordering guaranteed
Indexes(ctx context.Context, tag string) ([]digest.Digest, error)
// TagManifestsProvider provides method to retreive the digests of manifests that a tag historically
// pointed to
type TagManifestsProvider interface {
// ManifestDigests returns set of digests that this tag historically pointed to. This also
// includes currently linked digest. There is no ordering guaranteed
ManifestDigests(ctx context.Context, tag string) ([]digest.Digest, error)
}