app/imageoper: index only for OCI manifests
This commit is contained in:
@@ -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{}
|
||||
|
||||
Reference in New Issue
Block a user