Skip to content

Commit

Permalink
Merge pull request #100 from CycloneDX/spec-v1.5-component-types
Browse files Browse the repository at this point in the history
feat(spec1-5): add new component types
  • Loading branch information
nscuro authored Jun 24, 2023
2 parents a57054c + eb041b5 commit 72ea02c
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 72ea02c

Please sign in to comment.