Documentation
¶
Index ¶
Constants ¶
View Source
const ( // RunnerContextVersion0_1 represents Runner Context version 0.1 schema. RunnerContextVersion0_1 RunnerContextVersion = "0.1" // 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 ValidateChainloopRunnerContext ¶ added in v1.25.0
func ValidateChainloopRunnerContext(data interface{}, version RunnerContextVersion) error
ValidateChainloopRunnerContext validates the runner context schema. The schema version is determined by the "id" 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.
type RunnerContextVersion ¶ added in v1.25.0
type RunnerContextVersion string
RunnerContextVersion represents the version of Runner Context schema.
Click to show internal directories.
Click to hide internal directories.