return index on get magifest

This commit is contained in:
2026-02-23 18:38:45 +02:00
parent 96b24c6b63
commit 5ec5592a13
8 changed files with 156 additions and 61 deletions
+5
View File
@@ -19,6 +19,11 @@ import (
func ParseOCIManifest(rawManifest []byte) (*ocispec.Manifest, error) {
manifest := &ocispec.Manifest{}
manifest.Subject = &ocispec.Descriptor{}
manifest.Subject.Platform = &ocispec.Platform{}
manifest.Config = ocispec.Descriptor{}
manifest.Config.Platform = &ocispec.Platform{}
err := json.Unmarshal(rawManifest, &manifest)
if err != nil {
err = fmt.Errorf("Manifest parsing error: %v", err)
+13 -10
View File
@@ -10,16 +10,19 @@
package descr
type Manifest struct {
ID string `db:"id" json:"id"`
Name string `db:"name" json:"name"`
Reference string `db:"reference" json:"reference"`
ContentType string `db:"contentType" json:"contentType"`
Payload string `db:"payload" json:"-"`
Digest string `db:"digest" json:"digest"`
CreatedAt string `db:"created_at" json:"createdAt"`
UpdatedAt string `db:"updated_at" json:"updatedAt"`
CreatedBy string `db:"created_by" json:"createdBy,omitempty"`
UpdatedBy string `db:"updated_by" json:"updatedBy,omitempty"`
ID string `db:"id" json:"id"`
Name string `db:"name" json:"name"`
Reference string `db:"reference" json:"reference"`
ContentType string `db:"contentType" json:"contentType"`
Payload string `db:"payload" json:"-"`
Digest string `db:"digest" json:"digest"`
CreatedAt string `db:"created_at" json:"createdAt"`
UpdatedAt string `db:"updated_at" json:"updatedAt"`
CreatedBy string `db:"created_by" json:"createdBy,omitempty"`
UpdatedBy string `db:"updated_by" json:"updatedBy,omitempty"`
Architecture string `db:"architecture" json:"architecture,omitempty"`
OS string `db:"os" json:"os,omitempty"`
Variant string `db:"variant" json:"variant,omitempty"`
}
type Tags struct {