Skip to content

Commit

Permalink
feat(spec1-5): add support for device-driver component type
Browse files Browse the repository at this point in the history
Signed-off-by: nscuro <nscuro@protonmail.com>
  • Loading branch information
nscuro committed Jun 17, 2023
1 parent 781a647 commit 9ee6ffd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 2 additions & 0 deletions convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ func (sv SpecVersion) supportsComponentType(cType ComponentType) bool {
return sv >= SpecVersion1_1
case ComponentTypeContainer, ComponentTypeFirmware:
return sv >= SpecVersion1_2
case ComponentTypeDeviceDriver:
return sv >= SpecVersion1_5
}

return false
Expand Down
17 changes: 9 additions & 8 deletions cyclonedx.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,15 @@ type BOMReference string
type ComponentType string

const (
ComponentTypeApplication ComponentType = "application"
ComponentTypeContainer ComponentType = "container"
ComponentTypeDevice ComponentType = "device"
ComponentTypeFile ComponentType = "file"
ComponentTypeFirmware ComponentType = "firmware"
ComponentTypeFramework ComponentType = "framework"
ComponentTypeLibrary ComponentType = "library"
ComponentTypeOS ComponentType = "operating-system"
ComponentTypeApplication ComponentType = "application"
ComponentTypeContainer ComponentType = "container"
ComponentTypeDevice ComponentType = "device"
ComponentTypeDeviceDriver ComponentType = "device-driver"
ComponentTypeFile ComponentType = "file"
ComponentTypeFirmware ComponentType = "firmware"
ComponentTypeFramework ComponentType = "framework"
ComponentTypeLibrary ComponentType = "library"
ComponentTypeOS ComponentType = "operating-system"
)

type Commit struct {
Expand Down

0 comments on commit 9ee6ffd

Please sign in to comment.