errorext

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const AuthorizeMessage = "unauthorized request"
View Source
const InternalMessage = "internal server error"
View Source
const NotFoundMessage = "data not found"
View Source
const ValidationMessage = "invalid data or parameters"

Variables

This section is empty.

Functions

func ToStringSlice

func ToStringSlice(errs ...error) []string

Types

type AuthorizeError

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

func (AuthorizeError) Error

func (err AuthorizeError) Error() string

func (AuthorizeError) Inners

func (err AuthorizeError) Inners() []error

func (AuthorizeError) StatusCode

func (AuthorizeError) StatusCode() int

func (AuthorizeError) String

func (err AuthorizeError) String() string

type IHandledError

type IHandledError interface {
	Error() string
	Inners() []error
	String() string
	StatusCode() int
}

func NewAuthorize

func NewAuthorize(errs ...error) IHandledError

func NewAuthorizeError

func NewAuthorizeError(message string, errs ...error) IHandledError

func NewInternal

func NewInternal(errs ...error) IHandledError

func NewInternalError

func NewInternalError(message string, errs ...error) IHandledError

func NewNotFound

func NewNotFound(errs ...error) IHandledError

func NewNotFoundError

func NewNotFoundError(message string, errs ...error) IHandledError

func NewValidation

func NewValidation(errs ...error) IHandledError

func NewValidationError

func NewValidationError(message string, errs ...error) IHandledError

type InternalError

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

func (InternalError) Error

func (err InternalError) Error() string

func (InternalError) Inners

func (err InternalError) Inners() []error

func (InternalError) StatusCode

func (InternalError) StatusCode() int

func (InternalError) String

func (err InternalError) String() string

type NotFoundError

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

func (NotFoundError) Error

func (err NotFoundError) Error() string

func (NotFoundError) Inners

func (err NotFoundError) Inners() []error

func (NotFoundError) StatusCode

func (NotFoundError) StatusCode() int

func (NotFoundError) String

func (err NotFoundError) String() string

type ValidationError

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

func (ValidationError) Error

func (err ValidationError) Error() string

func (ValidationError) Inners

func (err ValidationError) Inners() []error

func (ValidationError) StatusCode

func (ValidationError) StatusCode() int

func (ValidationError) String

func (err ValidationError) String() string

Jump to

Keyboard shortcuts

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