1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
// SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
package spdx
// CreationInfo2_1 is a Document Creation Information section of an
// SPDX Document for version 2.1 of the spec.
type CreationInfo2_1 struct {
// 2.1: SPDX Version; should be in the format "SPDX-2.1"
// Cardinality: mandatory, one
SPDXVersion string
// 2.2: Data License; should be "CC0-1.0"
// Cardinality: mandatory, one
DataLicense string
// 2.3: SPDX Identifier; should be "DOCUMENT" to represent
// mandatory identifier of SPDXRef-DOCUMENT
// Cardinality: mandatory, one
SPDXIdentifier ElementID
// 2.4: Document Name
// Cardinality: mandatory, one
DocumentName string
// 2.5: Document Namespace
// Cardinality: mandatory, one
DocumentNamespace string
// 2.6: External Document References
// Cardinality: optional, one or many
ExternalDocumentReferences map[string]ExternalDocumentRef2_1
// 2.7: License List Version
// Cardinality: optional, one
LicenseListVersion string
// 2.8: Creators: may have multiple keys for Person, Organization
// and/or Tool
// Cardinality: mandatory, one or many
CreatorPersons []string
CreatorOrganizations []string
CreatorTools []string
// 2.9: Created: data format YYYY-MM-DDThh:mm:ssZ
// Cardinality: mandatory, one
Created string
// 2.10: Creator Comment
// Cardinality: optional, one
CreatorComment string
// 2.11: Document Comment
// Cardinality: optional, one
DocumentComment string
}
// ExternalDocumentRef2_1 is a reference to an external SPDX document
// as defined in section 2.6 for version 2.1 of the spec.
type ExternalDocumentRef2_1 struct {
// DocumentRefID is the ID string defined in the start of the
// reference. It should _not_ contain the "DocumentRef-" part
// of the mandatory ID string.
DocumentRefID string
// URI is the URI defined for the external document
URI string
// Alg is the type of hash algorithm used, e.g. "SHA1", "SHA256"
Alg string
// Checksum is the actual hash data
Checksum string
}
// CreationInfo2_2 is a Document Creation Information section of an
// SPDX Document for version 2.2 of the spec.
type CreationInfo2_2 struct {
// 2.1: SPDX Version; should be in the format "SPDX-2.2"
// Cardinality: mandatory, one
SPDXVersion string
// 2.2: Data License; should be "CC0-1.0"
// Cardinality: mandatory, one
DataLicense string
// 2.3: SPDX Identifier; should be "DOCUMENT" to represent
// mandatory identifier of SPDXRef-DOCUMENT
// Cardinality: mandatory, one
SPDXIdentifier ElementID
// 2.4: Document Name
// Cardinality: mandatory, one
DocumentName string
// 2.5: Document Namespace
// Cardinality: mandatory, one
DocumentNamespace string
// 2.6: External Document References
// Cardinality: optional, one or many
ExternalDocumentReferences map[string]ExternalDocumentRef2_2
// 2.7: License List Version
// Cardinality: optional, one
LicenseListVersion string
// 2.8: Creators: may have multiple keys for Person, Organization
// and/or Tool
// Cardinality: mandatory, one or many
CreatorPersons []string
CreatorOrganizations []string
CreatorTools []string
// 2.9: Created: data format YYYY-MM-DDThh:mm:ssZ
// Cardinality: mandatory, one
Created string
// 2.10: Creator Comment
// Cardinality: optional, one
CreatorComment string
// 2.11: Document Comment
// Cardinality: optional, one
DocumentComment string
}
// ExternalDocumentRef2_2 is a reference to an external SPDX document
// as defined in section 2.6 for version 2.2 of the spec.
type ExternalDocumentRef2_2 struct {
// DocumentRefID is the ID string defined in the start of the
// reference. It should _not_ contain the "DocumentRef-" part
// of the mandatory ID string.
DocumentRefID string
// URI is the URI defined for the external document
URI string
// Alg is the type of hash algorithm used, e.g. "SHA1", "SHA256"
Alg string
// Checksum is the actual hash data
Checksum string
}
|