Skip to content

Commit 4729b5e

Browse files
authored
Merge pull request #19 from monzo/component-external-references
Add support for the ExternalReferences field in components
2 parents c0854e0 + 96444d1 commit 4729b5e

File tree

1 file changed

+38
-31
lines changed

1 file changed

+38
-31
lines changed

component.go

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,44 @@ import (
99
)
1010

1111
type Component struct {
12-
UUID uuid.UUID `json:"uuid,omitempty"`
13-
Author string `json:"author,omitempty"`
14-
Publisher string `json:"publisher,omitempty"`
15-
Group string `json:"group,omitempty"`
16-
Name string `json:"name"`
17-
Version string `json:"version"`
18-
Classifier string `json:"classifier,omitempty"`
19-
FileName string `json:"filename,omitempty"`
20-
Extension string `json:"extension,omitempty"`
21-
MD5 string `json:"md5,omitempty"`
22-
SHA1 string `json:"sha1,omitempty"`
23-
SHA256 string `json:"sha256,omitempty"`
24-
SHA384 string `json:"sha384,omitempty"`
25-
SHA512 string `json:"sha512,omitempty"`
26-
SHA3_256 string `json:"sha3_256,omitempty"`
27-
SHA3_384 string `json:"sha3_384,omitempty"`
28-
SHA3_512 string `json:"sha3_512,omitempty"`
29-
BLAKE2b_256 string `json:"blake2b_256,omitempty"`
30-
BLAKE2b_384 string `json:"blake2b_384,omitempty"`
31-
BLAKE2b_512 string `json:"blake2b_512,omitempty"`
32-
BLAKE3 string `json:"blake3,omitempty"`
33-
CPE string `json:"cpe,omitempty"`
34-
PURL string `json:"purl,omitempty"`
35-
SWIDTagID string `json:"swidTagId,omitempty"`
36-
Internal bool `json:"isInternal,omitempty"`
37-
Description string `json:"description,omitempty"`
38-
Copyright string `json:"copyright,omitempty"`
39-
License string `json:"license,omitempty"`
40-
ResolvedLicense *License `json:"resolvedLicense,omitempty"`
41-
DirectDependencies string `json:"directDependencies,omitempty"`
42-
Notes string `json:"notes,omitempty"`
12+
UUID uuid.UUID `json:"uuid,omitempty"`
13+
Author string `json:"author,omitempty"`
14+
Publisher string `json:"publisher,omitempty"`
15+
Group string `json:"group,omitempty"`
16+
Name string `json:"name"`
17+
Version string `json:"version"`
18+
Classifier string `json:"classifier,omitempty"`
19+
FileName string `json:"filename,omitempty"`
20+
Extension string `json:"extension,omitempty"`
21+
MD5 string `json:"md5,omitempty"`
22+
SHA1 string `json:"sha1,omitempty"`
23+
SHA256 string `json:"sha256,omitempty"`
24+
SHA384 string `json:"sha384,omitempty"`
25+
SHA512 string `json:"sha512,omitempty"`
26+
SHA3_256 string `json:"sha3_256,omitempty"`
27+
SHA3_384 string `json:"sha3_384,omitempty"`
28+
SHA3_512 string `json:"sha3_512,omitempty"`
29+
BLAKE2b_256 string `json:"blake2b_256,omitempty"`
30+
BLAKE2b_384 string `json:"blake2b_384,omitempty"`
31+
BLAKE2b_512 string `json:"blake2b_512,omitempty"`
32+
BLAKE3 string `json:"blake3,omitempty"`
33+
CPE string `json:"cpe,omitempty"`
34+
PURL string `json:"purl,omitempty"`
35+
SWIDTagID string `json:"swidTagId,omitempty"`
36+
Internal bool `json:"isInternal,omitempty"`
37+
Description string `json:"description,omitempty"`
38+
Copyright string `json:"copyright,omitempty"`
39+
License string `json:"license,omitempty"`
40+
ResolvedLicense *License `json:"resolvedLicense,omitempty"`
41+
DirectDependencies string `json:"directDependencies,omitempty"`
42+
Notes string `json:"notes,omitempty"`
43+
ExternalReferences []ExternalReference `json:"externalReferences,omitempty"`
44+
}
45+
46+
type ExternalReference struct {
47+
Type string `json:"type,omitempty"`
48+
URL string `json:"url,omitempty"`
49+
Comment string `json:"comment,omitempty"`
4350
}
4451

4552
type ComponentService struct {

0 commit comments

Comments
 (0)