Documentation ¶
Overview ¶
Package errors GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE
Index ¶
- func IsValidationError(err error) bool
- func Join(errors ...error) error
- func PrefixJSONPointer(err error, pointer jsontext.Pointer) error
- func SuffixJSONPointer(err error, suffix jsontext.Pointer) error
- func WrapLocation(err error, location string) error
- type ErrInvalidType
- type ErrMissingRequired
- type ErrMultipleOf
- type ErrNotMatch
- type NotInEnumError
- type OutOfRangeError
- type ValidationError
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidationError ¶
func WrapLocation ¶
Types ¶
type ErrInvalidType ¶
func (*ErrInvalidType) Error ¶
func (e *ErrInvalidType) Error() string
func (ErrInvalidType) RuntimeDoc ¶
func (v ErrInvalidType) RuntimeDoc(names ...string) ([]string, bool)
func (ErrInvalidType) ValidationError ¶
func (ErrInvalidType) ValidationError()
type ErrMissingRequired ¶
type ErrMissingRequired struct {
// contains filtered or unexported fields
}
func (*ErrMissingRequired) Error ¶
func (*ErrMissingRequired) Error() string
func (ErrMissingRequired) ValidationError ¶
func (ErrMissingRequired) ValidationError()
type ErrMultipleOf ¶
type ErrMultipleOf struct { Topic string Current any MultipleOf any // contains filtered or unexported fields }
func (*ErrMultipleOf) Error ¶
func (e *ErrMultipleOf) Error() string
func (ErrMultipleOf) RuntimeDoc ¶
func (v ErrMultipleOf) RuntimeDoc(names ...string) ([]string, bool)
func (ErrMultipleOf) ValidationError ¶
func (ErrMultipleOf) ValidationError()
type ErrNotMatch ¶
type ErrNotMatch struct { Topic string Current any Pattern string // contains filtered or unexported fields }
Example ¶
fmt.Println(&ErrNotMatch{ Topic: "value", Current: "1", Pattern: `/\d+/`, })
Output: value should match /\d+/, but got 1
func (*ErrNotMatch) Error ¶
func (err *ErrNotMatch) Error() string
func (ErrNotMatch) RuntimeDoc ¶
func (v ErrNotMatch) RuntimeDoc(names ...string) ([]string, bool)
func (ErrNotMatch) ValidationError ¶
func (ErrNotMatch) ValidationError()
type NotInEnumError ¶
type NotInEnumError struct { Topic string Current any Enums []any // contains filtered or unexported fields }
Example ¶
fmt.Println(&NotInEnumError{ Topic: "value", Current: "11", Enums: []any{ "1", "2", "3", }, })
Output: value should be one of 1, 2, 3, but got 11
func (*NotInEnumError) Error ¶
func (e *NotInEnumError) Error() string
func (NotInEnumError) RuntimeDoc ¶
func (v NotInEnumError) RuntimeDoc(names ...string) ([]string, bool)
func (NotInEnumError) ValidationError ¶
func (NotInEnumError) ValidationError()
type OutOfRangeError ¶
type OutOfRangeError struct { Topic string Current any Minimum any Maximum any ExclusiveMaximum bool ExclusiveMinimum bool // contains filtered or unexported fields }
Example ¶
fmt.Println(&OutOfRangeError{ Topic: "value", Minimum: "1", Maximum: "10", Current: "11", ExclusiveMinimum: true, ExclusiveMaximum: true, })
Output: value should be larger than 1 and less than 10, but got 11
func (*OutOfRangeError) Error ¶
func (e *OutOfRangeError) Error() string
func (OutOfRangeError) RuntimeDoc ¶
func (v OutOfRangeError) RuntimeDoc(names ...string) ([]string, bool)
func (OutOfRangeError) ValidationError ¶
func (OutOfRangeError) ValidationError()
type ValidationError ¶
type ValidationError interface {
ValidationError()
}
Click to show internal directories.
Click to hide internal directories.