customerrors

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BadImplementationError

type BadImplementationError struct {
	*BaseError
}

func NewBadImplementationError

func NewBadImplementationError(msg string, inner error) *BadImplementationError

NewBadImplementationError creates a new BadImplementationError with the given message and inner error. It returns a pointer to the created BadImplementationError.

type BaseError

type BaseError struct {
	Msg   string
	Code  int
	Inner error
}

func NewBaseError

func NewBaseError(msg string, code int, inner error) *BaseError

func (*BaseError) Error

func (e *BaseError) Error() string

func (*BaseError) GetCode

func (e *BaseError) GetCode() int

func (*BaseError) GetInner

func (e *BaseError) GetInner() error

func (*BaseError) GetMessage

func (e *BaseError) GetMessage() string

type BaseErrorInterface

type BaseErrorInterface interface {
	Error() string
	GetCode() int
	GetMessage() string
	GetInner() error
}

type DuplicateKeyError

type DuplicateKeyError struct {
	*BaseError
}

func NewDuplicateKeyError

func NewDuplicateKeyError(msg string, inner error) *DuplicateKeyError

NewDuplicateKeyError creates a new DuplicateKeyError with the given message and inner error. It returns a pointer to the created DuplicateKeyError.

type InternalServerError

type InternalServerError struct {
	*BaseError
}

func NewInternalServerError

func NewInternalServerError(msg string, inner error) *InternalServerError

NewInternalServerError creates a new InternalServerError with the given message and inner error. It returns a pointer to the created InternalServerError.

type NotFoundError

type NotFoundError struct {
	*BaseError
}

func NewNotFoundError

func NewNotFoundError(msg string, inner error) *NotFoundError

NewNotFoundError creates a new NotFoundError with the given message and inner error. It returns a pointer to the created NotFoundError.

type UnauthorizedError

type UnauthorizedError struct {
	*BaseError
}

func NewUnauthorizedError

func NewUnauthorizedError(msg string, inner error) *UnauthorizedError

NewUnauthorizedError creates a new UnauthorizedError with the given message and inner error. It returns a pointer to the created UnauthorizedError.

Jump to

Keyboard shortcuts

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