typeutil

package
v0.0.0-...-cb1a7a4 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadSchemaFromStrings

func LoadSchemaFromStrings(primary string, rest ...string) (*gojsonschema.Schema, error)

func ValidateYAMLString

func ValidateYAMLString(schema *gojsonschema.Schema, data string) error

func ValidationErrorFromResult

func ValidationErrorFromResult(result *gojsonschema.Result) error

Types

type FieldValidationError

type FieldValidationError struct {
	Context     string
	Field       string
	Description string
	Type        string
}

func (*FieldValidationError) Error

func (e *FieldValidationError) Error() string

type InvalidVersionKindError

type InvalidVersionKindError struct {
	ExpectedVersion, ExpectedKind string
	GotVersion, GotKind           string
}

func (*InvalidVersionKindError) Error

func (e *InvalidVersionKindError) Error() string

type ValidationError

type ValidationError struct {
	FieldErrors []*FieldValidationError
}

func (*ValidationError) Error

func (e *ValidationError) Error() string

type VersionKind

type VersionKind struct {
	APIVersion string `yaml:"apiVersion" json:"apiVersion,omitempty"`
	Kind       string `yaml:"kind" json:"kind,omitempty"`
}

type VersionKindExpectation

type VersionKindExpectation struct {
	APIVersion string
	Kind       string
}

func NewVersionKindExpectation

func NewVersionKindExpectation(apiVersion, kind string) *VersionKindExpectation

func (*VersionKindExpectation) NewFromYAMLString

func (vke *VersionKindExpectation) NewFromYAMLString(data string) (*VersionKind, error)

Jump to

Keyboard shortcuts

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