app/imageoper: index only for OCI manifests

This commit is contained in:
2026-03-13 15:34:53 +02:00
parent 920423ffeb
commit bebbf79c7a
3 changed files with 24 additions and 14 deletions
+4 -5
View File
@@ -21,11 +21,6 @@ import (
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
)
const (
oiiMediaType = "application/vnd.oci.image.index.v1+json"
oimMediaType = "application/vnd.oci.image.manifest.v1+json"
)
func indexFromManigestDescrs(mandescrs []descr.Manifest) (ocispec.Index, []byte, error) {
var err error
var indexdata []byte
@@ -37,6 +32,10 @@ func indexFromManigestDescrs(mandescrs []descr.Manifest) (ocispec.Index, []byte,
for _, mandescr := range mandescrs {
var man ocispec.Manifest
if mandescr.ContentType != oimMediaType && mandescr.ContentType != ddmMediaType {
continue
}
man.Subject = &ocispec.Descriptor{}
man.Subject.Platform = &ocispec.Platform{}
man.Config = ocispec.Descriptor{}