types

package
v1.10.5 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 8 Imported by: 0

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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