schema

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompiledCatalog

type CompiledCatalog struct {
	// contains filtered or unexported fields
}

CompiledCatalog contains all schemas compiled from one catalog hash.

func (*CompiledCatalog) Validate

func (catalog *CompiledCatalog) Validate(key string, value any) error

type CompilerCache

type CompilerCache struct {
	// contains filtered or unexported fields
}

CompilerCache compiles and reuses immutable schema sets by catalog hash.

func NewCompilerCache

func NewCompilerCache() *CompilerCache

func (*CompilerCache) Compile

func (cache *CompilerCache) Compile(hash string, definitions []Definition) (*CompiledCatalog, error)

type Definition

type Definition struct {
	Key    string
	Schema json.RawMessage
}

Definition is one named JSON Schema in a catalog.

type ValidationError

type ValidationError struct {
	Key     string
	Pointer string
	Cause   error
}

ValidationError identifies the schema and JSON Pointer that rejected a value.

func (*ValidationError) Error

func (err *ValidationError) Error() string

func (*ValidationError) Unwrap

func (err *ValidationError) Unwrap() error

Jump to

Keyboard shortcuts

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