Help us shape the future of Go! Take the 2026 Go Developer Survey

validator

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonSchemaValidator

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

func NewJsonSchemaValidator

func NewJsonSchemaValidator(draft *jsonschema.Draft, schemaDef string) (*JsonSchemaValidator, error)

func (*JsonSchemaValidator) Validate

func (v *JsonSchemaValidator) Validate(value interface{}) error

type OpenApiValidator

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

func NewOpenApiValidator

func NewOpenApiValidator(schemaDef string) (*OpenApiValidator, error)

func (*OpenApiValidator) Validate

func (v *OpenApiValidator) Validate(value interface{}) error

type ValidateError

type ValidateError []error

func (ValidateError) Error

func (ve ValidateError) Error() string

func (ValidateError) Errors

func (ve ValidateError) Errors() []string

type Validator

type Validator interface {
	Validate(value interface{}) error
}

func NewValidator

func NewValidator(version string, schemaDef string) (Validator, error)

Jump to

Keyboard shortcuts

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