This repository was archived by the owner on Jul 18, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +44
-2
lines changed
Expand file tree Collapse file tree 4 files changed +44
-2
lines changed Original file line number Diff line number Diff line change 1+ package v2
2+
3+ import "github.com/opencontainers/artifacts/specs-go"
4+
5+ // Artifact describes a registry artifact.
6+ // This structure provides `application/vnd.oci.artifact.manifest.v1+json` mediatype when marshalled to JSON.
7+ type Artifact struct {
8+ specs.Versioned
9+
10+ // MediaType is the media type of the object this schema refers to.
11+ MediaType string `json:"mediaType"`
12+
13+ // ArtifactType is the artifact type of the object this schema refers to.
14+ ArtifactType string `json:"artifactType"`
15+
16+ // Config references the index configuration.
17+ Config Descriptor `json:"config"`
18+
19+ // Blobs is a collection of blobs referenced by this manifest.
20+ Blobs []Descriptor `json:"blobs"`
21+
22+ // Manifests is a collection of manifests this artifact is linked to.
23+ Manifests []Descriptor `json:"manifests"`
24+
25+ // Annotations contains arbitrary metadata for the artifact manifest.
26+ Annotations map [string ]string `json:"annotations,omitempty"`
27+ }
Original file line number Diff line number Diff line change 1+ package v2
2+
3+ const (
4+ // ArtifactTypeNotaryV2 specifies the artifact type for a notary V2 object.
5+ ArtifactTypeNotaryV2 = "application/vnd.cncf.notary.v2"
6+ )
Original file line number Diff line number Diff line change 1515package v2
1616
1717const (
18- // MediaTypeImageIndex specifies the media type for an image index .
19- MediaTypeImageIndex = "application/vnd.oci.image.index.v2 +json"
18+ // MediaTypeArtifact specifies the media type for an OCI artifact .
19+ MediaTypeArtifact = "application/vnd.oci.artifact.manifest.v1 +json"
2020)
Original file line number Diff line number Diff line change 1+ package specs
2+
3+ // Versioned provides a struct with the manifest schemaVersion and mediaType.
4+ // Incoming content with unknown schema version can be decoded against this
5+ // struct to check the version.
6+ type Versioned struct {
7+ // SchemaVersion is the image manifest schema that this image follows
8+ SchemaVersion int `json:"schemaVersion"`
9+ }
You can’t perform that action at this time.
0 commit comments