Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Unwrap = errors.Unwrap
Functions ¶
func Decode ¶
func Decode(item Validatable, data io.Reader) error
Decode is used to unmarshall the given data into an object
func IsValidationError ¶
IsValidationError checkIfAnError is a validation error
func NewValidationError ¶
NewValidationError creates a new ValidationError
Types ¶
type Validatable ¶
type Validatable interface {
Validate() error
}
Validatable represents an item that has constraints on what a correct structure is an imposes these constraints through the Validate method
type ValidationError ¶
type ValidationError struct {
// contains filtered or unexported fields
}
ValidationError represents an issue with value setting on a struct
func (*ValidationError) Error ¶
func (v *ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.