return index on get magifest
This commit is contained in:
@@ -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
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user