errors

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorTypeNotFound string = "ERR_NOT_FOUND"
	ErrTypeNotCreated string = "ERR_NOT_CREATED"
	ErrTypeNotUpdated string = "ERR_NOT_UPDATED"
	ErrTypeConflict   string = "ERR_CONFLICT"
)

Variables

This section is empty.

Functions

func NewConflict

func NewConflict(err error) error

func NewNotCreated

func NewNotCreated(err error) error

func NewNotFound

func NewNotFound(err error) error

func NewNotUpdated added in v1.4.0

func NewNotUpdated(err error) error

Types

type Error

type Error struct {

	// Error contains the text of any failed operation
	// example: employee not found
	ErrorMessage string `json:"error_message"`

	// Type contains the text of the type of error
	// example: not found
	ErrorType string `json:"error_type"`
	// contains filtered or unexported fields
}

Error represents any error that can be generated by bludgeon swagger:model Error

func New added in v1.4.0

func New(items ...interface{}) (e Error)

func (Error) Error

func (e Error) Error() string

func (Error) Is added in v1.4.0

func (e Error) Is(err error) bool

func (Error) Type added in v1.4.0

func (e Error) Type() string

Jump to

Keyboard shortcuts

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