schemavalidators

package
v0.91.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

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 CSAFVersion

type CSAFVersion string

CSAFVersion represents the version of CSAF schema.

type CycloneDXVersion

type CycloneDXVersion string

CycloneDXVersion represents the version of CycloneDX schema.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL