1package distribution 2 3import ( 4 "context" 5) 6 7// TagService provides access to information about tagged objects. 8type TagService interface { 9 // Get retrieves the descriptor identified by the tag. Some 10 // implementations may differentiate between "trusted" tags and 11 // "untrusted" tags. If a tag is "untrusted", the mapping will be returned 12 // as an ErrTagUntrusted error, with the target descriptor. 13 Get(ctx context.Context, tag string) (Descriptor, error) 14 15 // Tag associates the tag with the provided descriptor, updating the 16 // current association, if needed. 17 Tag(ctx context.Context, tag string, desc Descriptor) error 18 19 // Untag removes the given tag association 20 Untag(ctx context.Context, tag string) error 21 22 // All returns the set of tags managed by this tag service 23 All(ctx context.Context) ([]string, error) 24 25 // Lookup returns the set of tags referencing the given digest. 26 Lookup(ctx context.Context, digest Descriptor) ([]string, error) 27} 28