working commit

This commit is contained in:
2026-03-16 20:55:36 +02:00
parent 5c1da77f4c
commit 13b1905e05
31 changed files with 177 additions and 151 deletions
+3 -4
View File
@@ -15,7 +15,6 @@ import (
"net/http"
"strconv"
//"mstore/pkg/auxoci"
"mstore/pkg/descr"
ocidigest "github.com/opencontainers/go-digest"
@@ -48,8 +47,8 @@ func (oper *Operator) ManifestExists(ctx context.Context, params *ManifestExists
var man descr.Manifest
var exist bool
digobj, err := ocidigest.Parse(params.Reference)
if err == nil {
digobj, parseErr := ocidigest.Parse(params.Reference)
if parseErr == nil {
exist, man, err = oper.mdb.GetManifestByDigest(ctx, params.Name, digobj.String())
if err != nil {
return res, http.StatusInternalServerError, err
@@ -75,7 +74,7 @@ func (oper *Operator) ManifestExists(ctx context.Context, params *ManifestExists
if err != nil {
return res, http.StatusInternalServerError, err
}
digobj := ocidigest.SHA256.FromBytes(indexdata)
digobj := ocidigest.FromBytes(indexdata)
res.DockerContentDigest = digobj.String()
size := int64(len(indexdata))
res.ContentLength = strconv.FormatInt(size, 10)