Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CycloneDXVersion1_5 represents CycloneDX version 1.5 schema. CycloneDXVersion1_5 CycloneDXVersion = "1.5" // CycloneDXVersion1_6 represents CycloneDX version 1.6 schema. CycloneDXVersion1_6 CycloneDXVersion = "1.6" // CSAFVersion2_0 represents CSAF version 2.0 schema. CSAFVersion2_0 CSAFVersion = "2.0" // CSAFVersion2_1 represents CSAF version 2.0 schema. CSAFVersion2_1 CSAFVersion = "2.1" )
Variables ¶
View Source
var ErrInvalidJSONPayload = errors.New("invalid JSON payload")
ErrInvalidJSONPayload represents an error for invalid JSON payload.
Functions ¶
func ValidateCSAF ¶
func ValidateCSAF(data interface{}) error
ValidateCSAF validates the given object against a CSAF schema version. The schema version is determined by the "csaf_version" field in the object.
func ValidateCycloneDX ¶
func ValidateCycloneDX(data interface{}, version CycloneDXVersion) error
ValidateCycloneDX validates the given object against the specified CycloneDX schema version.
Types ¶
type CycloneDXVersion ¶
type CycloneDXVersion string
CycloneDXVersion represents the version of CycloneDX schema.
Click to show internal directories.
Click to hide internal directories.