errs

package
v0.0.0-...-7a3fe27 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const BindingExistsErrorCode = "BINDING_ALREADY_EXISTS"
View Source
const BindingNotFoundErrorCode = "BINDING_NOT_FOUND"
View Source
const ExchangeExistsErrorCode = "EXCHANGE_ALREADY_EXISTS"
View Source
const ExchangeNotFoundErrorCode = "EXCHANGE_NOT_FOUND"
View Source
const MessageNotFoundErrorCode = "MESSAGE_NOT_FOUND"
View Source
const ParamInvalidErrorCode = "INVALID_PARAM"
View Source
const QueueEmptyErrorCode = "QUEUE_EMPTY"
View Source
const QueueExistsErrorCode = "QUEUE_ALREADY_EXISTS"
View Source
const QueueNonDeletableErrorCode = "QUEUE_NON_DELETABLE"
View Source
const QueueNotFoundErrorCode = "QUEUE_NOT_FOUND"
View Source
const ValidationErrorCode = "VALIDATION_ERROR"

Variables

This section is empty.

Functions

This section is empty.

Types

type AppError

type AppError interface {
	error
	GetCode() string
	GetMessage() string
}

type Error

type Error struct {
	Code    string            `json:"code,omitempty"`
	Param   string            `json:"param,omitempty"`
	Message string            `json:"message,omitempty"`
	Errors  []ValidationError `json:"errors,omitempty"`
}

func NewBindingExistsError

func NewBindingExistsError(msg string) *Error

func NewBindingNotFoundError

func NewBindingNotFoundError(msg string) *Error

func NewExchangeExistsError

func NewExchangeExistsError(msg string) *Error

func NewExchangeNotFoundError

func NewExchangeNotFoundError(msg string) *Error

func NewMessageNotFoundError

func NewMessageNotFoundError(msg string) *Error

func NewParamInvalidError

func NewParamInvalidError(param string, msg string) *Error

func NewQueueEmptyError

func NewQueueEmptyError(msg string) *Error

func NewQueueExistsError

func NewQueueExistsError(msg string) *Error

func NewQueueNonDeletableError

func NewQueueNonDeletableError(msg string) *Error

func NewQueueNotFoundError

func NewQueueNotFoundError(msg string) *Error

func NewValidationError

func NewValidationError(errors []validator.FieldError) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) GetCode

func (e *Error) GetCode() string

func (*Error) GetMessage

func (e *Error) GetMessage() string

type ValidationError

type ValidationError struct {
	Field   string `json:"field"`
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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