Skip to content

Commit 4561323

Browse files
committed
add(package): add const for external reference
1 parent a532726 commit 4561323

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

spdx/package.go

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,24 @@ import (
88
"strings"
99
)
1010

11+
const (
12+
CategorySecurity = "SECURITY"
13+
CategoryPackageManager = "PACKAGE-MANAGER"
14+
CategoryOther = "OTHER"
15+
CategoryPersistentId = "PERSISTENT-ID"
16+
17+
TypeSecurityCPE22Type = "cpe22Type"
18+
TypeSecurityCPE23Type = "cpe23Type"
19+
20+
TypePackageManagerMavenCentral = "maven-central"
21+
TypePackageManagerNpm = "npm"
22+
TypePackageManagerNuGet = "nuget"
23+
TypePackageManagerBower = "bower"
24+
TypePackageManagerPURL = "purl"
25+
26+
TypePersistentIdSwh = "swh"
27+
)
28+
1129
type Supplier struct {
1230
// can be "NOASSERTION"
1331
Supplier string
@@ -331,7 +349,7 @@ type Package2_2 struct {
331349
// PackageExternalReference2_2 is an External Reference to additional info
332350
// about a Package, as defined in section 3.21 in version 2.2 of the spec.
333351
type PackageExternalReference2_2 struct {
334-
// category is "SECURITY", "PACKAGE-MANAGER" or "OTHER"
352+
// category is "SECURITY", "PACKAGE-MANAGER", "PERSISTENT-ID" or "OTHER"
335353
Category string `json:"referenceCategory"`
336354

337355
// type is an [idstring] as defined in Appendix VI;

0 commit comments

Comments
 (0)