validation

package
v0.0.0-...-dc4e619 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 4 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateModel

func ValidateModel(obj interface{}, schema proto.Schema, name string) []error

Types

type InvalidObjectTypeError

type InvalidObjectTypeError struct {
	Path string
	Type string
}

func (InvalidObjectTypeError) Error

func (e InvalidObjectTypeError) Error() string

type InvalidTypeError

type InvalidTypeError struct {
	Path     string
	Expected string
	Actual   string
}

func (InvalidTypeError) Error

func (e InvalidTypeError) Error() string

type MissingRequiredFieldError

type MissingRequiredFieldError struct {
	Path  string
	Field string
}

func (MissingRequiredFieldError) Error

type UnknownFieldError

type UnknownFieldError struct {
	Path  string
	Field string
}

func (UnknownFieldError) Error

func (e UnknownFieldError) Error() string

type ValidationError

type ValidationError struct {
	Path string
	Err  error
}

func (ValidationError) Error

func (e ValidationError) Error() string

Jump to

Keyboard shortcuts

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