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
+1 -9
View File
@@ -33,14 +33,6 @@ type PutManifestResult struct {
Location string
}
const (
ddmMimeType = "application/vnd.docker.distribution.manifest.v2+json"
oimMimeType = "application/vnd.oci.image.manifest.v1+json"
XXXoicMimeType = "application/vnd.oci.image.config.v1+json"
XXXdciMimeType = "application/vnd.docker.container.image.v1+json"
)
// TODO: lock for the name-reference or simular?
func (oper *Operator) PutManifest(ctx context.Context, params *PutManifestParams) (*PutManifestResult, int, error) {
var err error
@@ -55,7 +47,7 @@ func (oper *Operator) PutManifest(ctx context.Context, params *PutManifestParams
return res, http.StatusBadRequest, err
}
// Check Content-Type
if params.ContentType != oimMimeType && params.ContentType != ddmMimeType {
if params.ContentType != oimMediaType && params.ContentType != ddmMediaType {
err = fmt.Errorf("Unknown or empty Content-Type: %s", params.ContentType)
return res, http.StatusNotFound, err
}