This repository was archived by the owner on Jul 18, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ module github.com/notaryproject/artifacts
2+
3+ go 1.16
4+
5+ require github.com/opencontainers/go-digest v1.0.0
Original file line number Diff line number Diff line change 1+ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U =
2+ github.com/opencontainers/go-digest v1.0.0 /go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM =
Original file line number Diff line number Diff line change 1+ package v2
2+
3+ import "github.com/notaryproject/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 configuration of the object this schema refers to. It is optional.
17+ Config * Descriptor `json:"config,omitempty"`
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+ )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- // Copyright 2016 The Linux Foundation
2- //
3- // Licensed under the Apache License, Version 2.0 (the "License");
4- // you may not use this file except in compliance with the License.
5- // You may obtain a copy of the License at
6- //
7- // http://www.apache.org/licenses/LICENSE-2.0
8- //
9- // Unless required by applicable law or agreed to in writing, software
10- // distributed under the License is distributed on an "AS IS" BASIS,
11- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12- // See the License for the specific language governing permissions and
13- // limitations under the License.
14-
151package v2
162
173const (
18- // MediaTypeImageIndex specifies the media type for an image index .
19- MediaTypeImageIndex = "application/vnd.oci.image.index.v2 +json"
4+ // MediaTypeArtifactManifest specifies the media type for an OCI artifact .
5+ MediaTypeArtifactManifest = "application/vnd.oci.artifact.manifest.v1 +json"
206)
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