Skip to content

Commit 47238a2

Browse files
authored
Merge pull request opencontainers#689 from AkihiroSuda/index-const
specs-go: add const for annotation keys
2 parents db0dfbd + a96fdde commit 47238a2

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed

annotations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This specification defines the following annotation keys, intended for but not l
2727
* version MAY be [Semantic versioning-compatible](http://semver.org/)
2828
* **org.opencontainers.image.revision** Source control revision identifier for the packaged software.
2929
* **org.opencontainers.image.vendor** Name of the distributing entity, organization or individual.
30-
* **org.opencontainers.image.licenses** License(s) under which contained software is distributed as a [SPDX License Expression][spdx-license-expression].
30+
* **org.opencontainers.image.licenses** License(s) under which contained software is distributed as an [SPDX License Expression][spdx-license-expression].
3131
* **org.opencontainers.image.ref.name** Name of the reference for a target (string). SHOULD only be considered valid when on descriptors on `index.json` within [image layout](image-layout.md).
3232
* **org.opencontainers.image.title** Human-readable title of the image (string)
3333
* **org.opencontainers.image.description** Human-readable description of the software packaged in the image (string)

specs-go/v1/annotations.go

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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+
15+
package v1
16+
17+
const (
18+
// AnnotationCreated is the annotation key for the date and time on which the image was built (date-time string as defined by RFC 3339).
19+
AnnotationCreated = "org.opencontainers.image.created"
20+
21+
// AnnotationAuthors is the annotation key for the contact details of the people or organization responsible for the image (freeform string).
22+
AnnotationAuthors = "org.opencontainers.image.authors"
23+
24+
// AnnotationURL is the annotation key for the URL to find more information on the image.
25+
AnnotationURL = "org.opencontainers.image.url"
26+
27+
// AnnotationDocumentation is the annotation key for the URL to get documentation on the image.
28+
AnnotationDocumentation = "org.opencontainers.image.documentation"
29+
30+
// AnnotationSource is the annotation key for the URL to get source code for building the image.
31+
AnnotationSource = "org.opencontainers.image.source"
32+
33+
// AnnotationVersion is the annotation key for the version of the packaged software.
34+
// The version MAY match a label or tag in the source code repository.
35+
// The version MAY be Semantic versioning-compatible.
36+
AnnotationVersion = "org.opencontainers.image.version"
37+
38+
// AnnotationRevision is the annotation key for the source control revision identifier for the packaged software.
39+
AnnotationRevision = "org.opencontainers.image.revision"
40+
41+
// AnnotationVendor is the annotation key for the name of the distributing entity, organization or individual.
42+
AnnotationVendor = "org.opencontainers.image.vendor"
43+
44+
// AnnotationLicenses is the annotation key for the license(s) under which contained software is distributed as an SPDX License Expression.
45+
AnnotationLicenses = "org.opencontainers.image.licenses"
46+
47+
// AnnotationRefName is the annotation key for the name of the reference for a target.
48+
// SHOULD only be considered valid when on descriptors on `index.json` within image layout.
49+
AnnotationRefName = "org.opencontainers.image.ref.name"
50+
51+
// AnnotationTitle is the annotation key for the human-readable title of the image.
52+
AnnotationTitle = "org.opencontainers.image.title"
53+
54+
// AnnotationDescription is the annotation key for the human-readable description of the software packaged in the image.
55+
AnnotationDescription = "org.opencontainers.image.description"
56+
)

0 commit comments

Comments
 (0)