Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidSpecification = errors.New("specification must be a struct pointer") ErrNotAStruct = errors.New("cannot wrap a non-struct type") ErrNotExported = errors.New("field is not exported") ErrNotSettable = errors.New("field is not settable") ErrMissingRequired = errors.New("required field is zero valued") )
Functions ¶
Types ¶
type InvalidConfig ¶
type InvalidConfig struct {
// contains filtered or unexported fields
}
Invalid is a field-specific configuration validation error and is returned either by field specification validation or by the user in a custom Validate() method.
func Invalid ¶
func Invalid(conf, field, issue string, args ...any) *InvalidConfig
func Parse ¶
func Parse(conf, field string, err error) *InvalidConfig
func Required ¶
func Required(conf, field string) *InvalidConfig
func (*InvalidConfig) Error ¶
func (e *InvalidConfig) Error() string
func (*InvalidConfig) Field ¶
func (e *InvalidConfig) Field() string
func (*InvalidConfig) Is ¶
func (e *InvalidConfig) Is(target error) bool
func (*InvalidConfig) Unwrap ¶
func (e *InvalidConfig) Unwrap() error
type ParseError ¶
func (*ParseError) Error ¶
func (e *ParseError) Error() string
func (*ParseError) Is ¶
func (e *ParseError) Is(target error) bool
func (*ParseError) Unwrap ¶
func (e *ParseError) Unwrap() error
type ValidationErrors ¶
type ValidationErrors []*InvalidConfig
func (ValidationErrors) Contains ¶
func (e ValidationErrors) Contains(target error) bool
func (ValidationErrors) Error ¶
func (e ValidationErrors) Error() string
func (ValidationErrors) Is ¶
func (e ValidationErrors) Is(target error) bool
Click to show internal directories.
Click to hide internal directories.