Skip to content

Commit

Permalink
feat(spec1-5): add new component types
Browse files Browse the repository at this point in the history
Signed-off-by: nscuro <nscuro@protonmail.com>
  • Loading branch information
nscuro committed Jun 24, 2023
1 parent a069906 commit eb041b5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 2 additions & 0 deletions convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ func (sv SpecVersion) supportsComponentType(cType ComponentType) bool {
return sv >= SpecVersion1_1
case ComponentTypeContainer, ComponentTypeFirmware:
return sv >= SpecVersion1_2
case ComponentTypeData, ComponentTypeDeviceDriver, ComponentTypeMachineLearningModel, ComponentTypePlatform:
return sv >= SpecVersion1_5
}

return false
Expand Down
20 changes: 12 additions & 8 deletions cyclonedx.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,18 @@ 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"
ComponentTypeData ComponentType = "data"
ComponentTypeDevice ComponentType = "device"
ComponentTypeDeviceDriver ComponentType = "device-driver"
ComponentTypeFile ComponentType = "file"
ComponentTypeFirmware ComponentType = "firmware"
ComponentTypeFramework ComponentType = "framework"
ComponentTypeLibrary ComponentType = "library"
ComponentTypeMachineLearningModel ComponentType = "machine-learning-model"
ComponentTypeOS ComponentType = "operating-system"
ComponentTypePlatform ComponentType = "platform"
)

type Commit struct {
Expand Down

0 comments on commit eb041b5

Please sign in to comment.