···112112 return tags, nil
113113}
114114115115+// List returns tags after `last` up to `limit` (pagination over All).
116116+func (s *TagStore) List(ctx context.Context, limit int, last string) ([]string, error) {
117117+ all, err := s.All(ctx)
118118+ if err != nil {
119119+ return nil, err
120120+ }
121121+122122+ var result []string
123123+ past := last == ""
124124+ for _, tag := range all {
125125+ if !past {
126126+ if tag == last {
127127+ past = true
128128+ }
129129+ continue
130130+ }
131131+ result = append(result, tag)
132132+ if limit > 0 && len(result) >= limit {
133133+ break
134134+ }
135135+ }
136136+ return result, nil
137137+}
138138+115139// Lookup returns the set of tags for a given digest
116140func (s *TagStore) Lookup(ctx context.Context, desc distribution.Descriptor) ([]string, error) {
117141 // List all records in the tag collection