errors

package
v1.6.5-rc52 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 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 ErrorSet

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

func NewErrorSet

func NewErrorSet() *ErrorSet

func NewErrorSetWithRoot

func NewErrorSetWithRoot(root string) *ErrorSet

func (*ErrorSet) AddErr

func (set *ErrorSet) AddErr(err error, keyPathNodes ...interface{})

func (*ErrorSet) Each

func (set *ErrorSet) Each(cb func(*FieldError))

func (*ErrorSet) Err

func (set *ErrorSet) Err() error

func (*ErrorSet) Error

func (set *ErrorSet) Error() string

func (*ErrorSet) Flatten

func (set *ErrorSet) Flatten() *ErrorSet

func (*ErrorSet) Len

func (set *ErrorSet) Len() int

func (*ErrorSet) ToErrorFields

func (set *ErrorSet) ToErrorFields() statusx.ErrorFields

type FieldError

type FieldError struct {
	Field KeyPath
	Error error `json:"msg"`
}

type KeyPath

type KeyPath []interface{}

func (KeyPath) String

func (keyPath KeyPath) String() string

type Location

type Location string

type MissingRequiredFieldError

type MissingRequiredFieldError struct{}

func (MissingRequiredFieldError) Error

type MultipleOfError

type MultipleOfError struct {
	Target     string
	Current    interface{}
	MultipleOf interface{}
}

func (*MultipleOfError) Error

func (e *MultipleOfError) Error() string

type NotInEnumError

type NotInEnumError struct {
	Target  string
	Current interface{}
	Enums   []interface{}
}

func (*NotInEnumError) Error

func (e *NotInEnumError) Error() string

type NotMatchError

type NotMatchError struct {
	Target  string
	Current interface{}
	Pattern *regexp.Regexp
}

func (*NotMatchError) Error

func (err *NotMatchError) Error() string

type OutOfRangeError

type OutOfRangeError struct {
	Target           string
	Current          interface{}
	Minimum          interface{}
	Maximum          interface{}
	ExclusiveMaximum bool
	ExclusiveMinimum bool
}

func (*OutOfRangeError) Error

func (e *OutOfRangeError) Error() string

type SyntaxError

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

func NewSyntaxError

func NewSyntaxError(format string, args ...interface{}) *SyntaxError

func (*SyntaxError) Error

func (e *SyntaxError) Error() string

type UnsupportedTypeError

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

func NewUnsupportedTypeError

func NewUnsupportedTypeError(typ string, rule string, msgs ...string) *UnsupportedTypeError

func (*UnsupportedTypeError) Error

func (e *UnsupportedTypeError) Error() string

Jump to

Keyboard shortcuts

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