validate

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultExternalSchema is the default JSON schema to load for validation.
	DefaultExternalSchema = "/etc/cdi/schema/schema.json"
)

Variables

This section is empty.

Functions

func WithDefaultSchema

func WithDefaultSchema() func(*raw.Spec) error

WithDefaultSchema returns a CDI Spec validator that uses the default external JSON schema, or the default builtin one if the external one fails to load.

func WithNamedSchema

func WithNamedSchema(name string) func(*raw.Spec) error

WithNamedSchema loads the named JSON schema and returns a CDI Spec validator for it. If loading the schema fails a dummy validator is returned.

func WithSchema

func WithSchema(s *schema.Schema) func(*raw.Spec) error

WithSchema returns a CDI Spec validator that uses the given Schema.

Types

This section is empty.

Jump to

Keyboard shortcuts

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