schemavalidators

package
v1.63.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RunnerContextVersion0_1 represents Runner Context version 0.1 schema.
	RunnerContextVersion0_1 RunnerContextVersion = "0.1"
	// PRInfoVersion1_0 represents PR/MR Info version 1.0 schema.
	PRInfoVersion1_0 PRInfoVersion = "1.0"
	// 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.

func ValidatePRInfo added in v1.63.0

func ValidatePRInfo(data interface{}, version PRInfoVersion) error

ValidatePRInfo validates the PR/MR info schema.

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.

type PRInfoVersion added in v1.63.0

type PRInfoVersion string

PRInfoVersion represents the version of PR/MR Info schema.

type RunnerContextVersion added in v1.25.0

type RunnerContextVersion string

RunnerContextVersion represents the version of Runner Context schema.

Jump to

Keyboard shortcuts

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