@@ -157,7 +157,7 @@ func (cli *RegistryClient) IsLoggedIn() bool {
157157	return  cli .Token  !=  nil 
158158}
159159
160- func  decodeTagData (body  io.ReadCloser ) ([]string , map [string ]manifest.Manifest , error ) {
160+ func  decodeAllTagData (body  io.ReadCloser ) ([]string , map [string ]manifest.Manifest , error ) {
161161	tagData  :=  struct  {
162162		TagNames      []string                 `json:"tags"` 
163163		RawManifests  map [string ]manifest.Raw  `json:"manifest,omitempty"` 
@@ -172,8 +172,6 @@ func decodeTagData(body io.ReadCloser) ([]string, map[string]manifest.Manifest,
172172		return  nil , nil , err 
173173	}
174174
175- 	tagManifests  =  manifest .MapByTag (tagManifests )
176- 
177175	return  tagData .TagNames , manifest .MapByTag (tagManifests ), nil 
178176}
179177
@@ -206,8 +204,21 @@ func (cli *RegistryClient) repoToken(repoPath string) (auth.Token, error) {
206204	return  cli .RepoTokens [repoPath ], nil 
207205}
208206
209- // TagData gets list of all tag names and all additional data for the repository path specified 
210- func  (cli  * RegistryClient ) TagData (repoPath  string ) ([]string , map [string ]manifest.Manifest , error ) {
207+ // TagData gets data of either all tags (list+get) or a set of single tags only (blind "get") 
208+ func  (cli  * RegistryClient ) TagData (
209+ 	repoPath  string ,
210+ 	isSingle  bool ,
211+ 	repoTags  []string ,
212+ ) ([]string , map [string ]manifest.Manifest , error ) {
213+ 	if  isSingle  {
214+ 		return  cli .SingleTagData (repoTags )
215+ 	}
216+ 
217+ 	return  cli .AllTagData (repoPath )
218+ }
219+ 
220+ // AllTagData gets list of all tag names and all additional data for the repository path specified 
221+ func  (cli  * RegistryClient ) AllTagData (repoPath  string ) ([]string , map [string ]manifest.Manifest , error ) {
211222	repoToken , err  :=  cli .repoToken (repoPath )
212223	if  err  !=  nil  {
213224		return  nil , nil , err 
@@ -230,7 +241,7 @@ func (cli *RegistryClient) TagData(repoPath string) ([]string, map[string]manife
230241			return  nil , nil , err 
231242		}
232243
233- 		tagNames , tagManifests , err  :=  decodeTagData (resp .Body )
244+ 		tagNames , tagManifests , err  :=  decodeAllTagData (resp .Body )
234245		if  err  !=  nil  {
235246			return  nil , nil , err 
236247		}
@@ -248,6 +259,17 @@ func (cli *RegistryClient) TagData(repoPath string) ([]string, map[string]manife
248259	return  allTagNames , allTagManifests , nil 
249260}
250261
262+ // SingleTagData gets data for a set of single tags 
263+ func  (cli  * RegistryClient ) SingleTagData (repoTags  []string ) ([]string , map [string ]manifest.Manifest , error ) {
264+ 	tagManifests  :=  make (map [string ]manifest.Manifest )
265+ 
266+ 	for  _ , tagName  :=  range  repoTags  {
267+ 		tagManifests [tagName ] =  manifest.Manifest {}
268+ 	}
269+ 
270+ 	return  repoTags , tagManifests , nil 
271+ }
272+ 
251273func  (cli  * RegistryClient ) tagDigest (repoPath , tagName  string ) (string , error ) {
252274	repoToken , err  :=  cli .repoToken (repoPath )
253275	if  err  !=  nil  {
0 commit comments