(ctx context.Context, repo distribution.Repository, ref reference.Named)
| 42 | } |
| 43 | |
| 44 | func fetchList(ctx context.Context, repo distribution.Repository, ref reference.Named) ([]types.ImageManifest, error) { |
| 45 | manifest, err := getManifest(ctx, repo, ref) |
| 46 | if err != nil { |
| 47 | return nil, err |
| 48 | } |
| 49 | |
| 50 | switch v := manifest.(type) { |
| 51 | case *manifestlist.DeserializedManifestList: |
| 52 | return pullManifestList(ctx, ref, repo, *v) |
| 53 | default: |
| 54 | return nil, fmt.Errorf("unsupported manifest format: %v", v) |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | func getManifest(ctx context.Context, repo distribution.Repository, ref reference.Named) (distribution.Manifest, error) { |
| 59 | manSvc, err := repo.Manifests(ctx) |
no test coverage detected
searching dependent graphs…