Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewValidationError ¶
func NewValidationError(errors validator.ValidationErrors, validator *validator.Validate) error
Types ¶
type PanicRecoveredError ¶
type PanicRecoveredError struct {
// contains filtered or unexported fields
}
PanicRecoveredError can be used as default error type when panics have been recovered. This can come in handy if using a recovery middleware or simply while encoding errors to transport layer.
func NewPanicRecoveredError ¶
func NewPanicRecoveredError(err error) PanicRecoveredError
NewPanicRecoveredError wraps the error as PanicRecoveredError and adds 'recovered panic:' to the message.
type ValidationError ¶
type ValidationError struct {
// contains filtered or unexported fields
}
func (ValidationError) Error ¶
func (err ValidationError) Error() string
func (ValidationError) FieldErrors ¶
func (err ValidationError) FieldErrors() []validator.FieldError
func (ValidationError) GrpcStatus ¶
func (err ValidationError) GrpcStatus() *status.Status
ValidationError creates an 'InvalidArgument' response and attaches all 'FieldViolation' structs.
Click to show internal directories.
Click to hide internal directories.