errors

package
v1.0.0-alpha5 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConflictError

func NewConflictError(text string) error

func NewInternalError

func NewInternalError(text string) error

func NewNotFoundError

func NewNotFoundError(text string) error

func TranslateValidatorError

func TranslateValidatorError(err error, trans ut.Translator) error

TranslateValidatorError takes an error from the go-playground validator (internally just a map of errors) and converts it into a string which can then be used to create a new error. The purpose of this function is to get around the fact that go-playground validator creates errors that are not in a user friendly format.

Types

type ConflictError

type ConflictError struct {
	// contains filtered or unexported fields
}

func (*ConflictError) Error

func (e *ConflictError) Error() string

type InternalError

type InternalError struct {
	// contains filtered or unexported fields
}

func (*InternalError) Error

func (e *InternalError) Error() string

type NotFoundError

type NotFoundError struct {
	// contains filtered or unexported fields
}

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Jump to

Keyboard shortcuts

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