image: fixed tags, catalog, push operation

This commit is contained in:
2026-03-11 21:02:10 +02:00
parent a064d942e7
commit 0d67944966
9 changed files with 25 additions and 18 deletions
+4 -4
View File
@@ -1,10 +1,10 @@
package config
const (
confdir = "/usr/local/etc/mstore"
rundir = "/var/run/mstore"
logdir = "/var/log/mstore"
datadir = "/var/data/mstore"
confdir = "/home/ziggi/Projects/mstore/etc/mstore"
rundir = "/home/ziggi/Projects/mstore/tmp/run"
logdir = "/home/ziggi/Projects/mstore/tmp/log"
datadir = "/home/ziggi/Projects/mstore/tmp/data"
version = "0.2.0"
srvname = "mstored"
)
+2 -1
View File
@@ -237,5 +237,6 @@ func (hand *Handler) ListManifests(rctx *router.Context) {
if err != nil {
hand.logg.Errorf("ListManifests error: %v", err)
}
rctx.SendJSON(code, res)
rctx.SendJSON(code, res.Repositories)
}
+3 -3
View File
@@ -95,6 +95,9 @@ func (oper *Operator) PutManifest(ctx context.Context, params *PutManifestParams
return res, code, err
}
inMan := &ocispec.Manifest{}
inMan.Subject = &ocispec.Descriptor{}
inMan.Subject.Platform = &ocispec.Platform{}
err = json.Unmarshal(inManData, inMan)
if err != nil {
err = fmt.Errorf("Manifest parsing error: %v", err)
@@ -107,9 +110,6 @@ func (oper *Operator) PutManifest(ctx context.Context, params *PutManifestParams
name := params.Name
reference := params.Reference
if inMan.Subject == nil {
}
arch := inMan.Subject.Platform.Architecture
os := inMan.Subject.Platform.OS
variant := inMan.Subject.Platform.Variant
+1
View File
@@ -98,6 +98,7 @@ func (svc *Service) Build() error {
svc.rout.Post(`/v2/{name}/blobs/uploads/`, svc.hand.PostUpload)
svc.rout.Patch(`/v2/{name}/blobs/uploads/{reference}`, svc.hand.PatchUpload)
svc.rout.Put(`/v2/{name}/blobs/uploads/{reference}`, svc.hand.PutUpload)
svc.rout.Put(`/v2/{name}/uploads/{reference}`, svc.hand.PutUpload)
svc.rout.Get(`/v2/{name}/blobs/{digest}`, svc.hand.GetBlob)
svc.rout.Delete(`/v2/{name}/blobs/{digest}`, svc.hand.DeleteBlob)