This repository has been archived by the owner on Jul 18, 2023. It is now read-only.
generated from opencontainers/project-template
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Aviral Takkar <aviral26@users.noreply.github.com>
- Loading branch information
Showing
4 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package v2 | ||
|
||
import "github.com/opencontainers/artifacts/specs-go" | ||
|
||
// Artifact describes a registry artifact. | ||
// This structure provides `application/vnd.oci.artifact.manifest.v1+json` mediatype when marshalled to JSON. | ||
type Artifact struct { | ||
specs.Versioned | ||
|
||
// MediaType is the media type of the object this schema refers to. | ||
MediaType string `json:"mediaType"` | ||
|
||
// ArtifactType is the artifact type of the object this schema refers to. | ||
ArtifactType string `json:"artifactType"` | ||
|
||
// Config references the index configuration. | ||
Config Descriptor `json:"config"` | ||
|
||
// Blobs is a collection of blobs referenced by this manifest. | ||
Blobs []Descriptor `json:"blobs"` | ||
|
||
// Manifests is a collection of manifests this artifact is linked to. | ||
Manifests []Descriptor `json:"manifests"` | ||
|
||
// Annotations contains arbitrary metadata for the artifact manifest. | ||
Annotations map[string]string `json:"annotations,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package v2 | ||
|
||
const ( | ||
// ArtifactTypeNotaryV2 specifies the artifact type for a notary V2 object. | ||
ArtifactTypeNotaryV2 = "application/vnd.cncf.notary.v2" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package specs | ||
|
||
// Versioned provides a struct with the manifest schemaVersion and mediaType. | ||
// Incoming content with unknown schema version can be decoded against this | ||
// struct to check the version. | ||
type Versioned struct { | ||
// SchemaVersion is the image manifest schema that this image follows | ||
SchemaVersion int `json:"schemaVersion"` | ||
} |