errors

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthenticationError

func NewAuthenticationError(messageKey string, message string) error

func NewAuthorizationError

func NewAuthorizationError(messageKey string, message string) error

func NewIllegalInputError

func NewIllegalInputError(messageKey string, message string) error

func NewInternalError

func NewInternalError(messageKey string, message string) error

func NewResourceNotFoundError

func NewResourceNotFoundError(messageKey string, message string) error

func WrapMultiErr

func WrapMultiErr(errorType string, messageKey string, message string, err error) error

Types

type ErrorType

type ErrorType = string
const (
	ErrorTypeInternalError         ErrorType = "internal-error"
	ErrorTypeIllegalInputError     ErrorType = "illegal-input-error"
	ErrorTypeAuthenticationError   ErrorType = "authentication-error"
	ErrorTypeAuthorizationError    ErrorType = "authorization-error"
	ErrorTypeResourceNotFoundError ErrorType = "resource-not-found-error"
)

type POSError

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

func NewPOSError

func NewPOSError(errType ErrorType, key string, message string) *POSError

func (POSError) ErrType

func (p POSError) ErrType() ErrorType

func (POSError) Error

func (p POSError) Error() string

func (POSError) Key

func (p POSError) Key() string

func (POSError) Message

func (p POSError) Message() string

type POSMultiError

type POSMultiError struct {
	*POSError
	// contains filtered or unexported fields
}

func (POSMultiError) Children

func (e POSMultiError) Children() []error

func (*POSMultiError) Error

func (e *POSMultiError) Error() string

Jump to

Keyboard shortcuts

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