errors

package
v0.0.0-...-ba12aaf Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiError

type ApiError interface {
	Message() string
	Code() string
	Status() int
	Cause() CauseList
	Error() string
}

func NewApiError

func NewApiError(message string, error string, status int, cause CauseList) ApiError

func NewApiErrorFromBytes

func NewApiErrorFromBytes(data []byte) (ApiError, error)

func NewBadRequestApiError

func NewBadRequestApiError(message string) ApiError

func NewConflictApiError

func NewConflictApiError(id string) ApiError

func NewForbiddenApiError

func NewForbiddenApiError(message string) ApiError

func NewInternalServerApiError

func NewInternalServerApiError(message string, err error) ApiError

func NewMethodNotAllowedApiError

func NewMethodNotAllowedApiError() ApiError

func NewNotFoundApiError

func NewNotFoundApiError(message string) ApiError

func NewTooManyRequestsError

func NewTooManyRequestsError(message string) ApiError

func NewUnauthorizedApiError

func NewUnauthorizedApiError(message string) ApiError

func NewValidationApiError

func NewValidationApiError(message string, error string, cause CauseList) ApiError

type CauseList

type CauseList []interface{}

func (CauseList) ToString

func (c CauseList) ToString() string

Jump to

Keyboard shortcuts

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