errors

package
v0.0.0-...-9fb9eb8 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateErrorType

func ValidateErrorType[T baseError](err error) bool

func Wrap

func Wrap(err error, message string) error

func Wrapf

func Wrapf(err error, format string, args ...interface{}) error

Types

type BadRequestError

type BadRequestError struct {
	ToserbaError
}

func NewBadRequestError

func NewBadRequestError(err string) *BadRequestError

func NewBadRequestErrorf

func NewBadRequestErrorf(format string, args ...interface{}) *BadRequestError

type ConflictError

type ConflictError struct {
	ToserbaError
}

func NewConflictError

func NewConflictError(message string) *ConflictError

func NewConflictErrorf

func NewConflictErrorf(format string, args ...interface{}) *ConflictError

type DBError

type DBError struct {
	ToserbaError
}

func NewDBError

func NewDBError(err error, message string) *DBError

func NewDBErrorf

func NewDBErrorf(err error, format string, args ...interface{}) *DBError

func NewSimpleDBError

func NewSimpleDBError(message string) *DBError

func NewSimpleDBErrorf

func NewSimpleDBErrorf(format string, args ...interface{}) *DBError

type NotFoundError

type NotFoundError struct {
	ToserbaError
}

func NewNotFoundError

func NewNotFoundError(err string) *NotFoundError

func NewNotFoundErrorf

func NewNotFoundErrorf(format string, args ...interface{}) *NotFoundError

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

type ToserbaError

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

func New

func New(message string) ToserbaError

func NewToserbaError

func NewToserbaError(message string, code int) ToserbaError

func (ToserbaError) Code

func (e ToserbaError) Code() int

func (ToserbaError) Error

func (e ToserbaError) Error() string

type UnauthorizedError

type UnauthorizedError struct {
	ToserbaError
}

func NewUnauthorizedError

func NewUnauthorizedError(message string) *UnauthorizedError

func NewUnauthorizedErrorf

func NewUnauthorizedErrorf(format string, args ...interface{}) *UnauthorizedError

type UnprocessableEntityError

type UnprocessableEntityError struct {
	ToserbaError
	// contains filtered or unexported fields
}

func NewUnprocessableEntityError

func NewUnprocessableEntityError(message string) *UnprocessableEntityError

func NewUnprocessableEntityErrorWithTitle

func NewUnprocessableEntityErrorWithTitle(message string, title string) *UnprocessableEntityError

func NewUnprocessableEntityErrorf

func NewUnprocessableEntityErrorf(format string, args ...interface{}) *UnprocessableEntityError

func (*UnprocessableEntityError) ErrorTitle

func (e *UnprocessableEntityError) ErrorTitle() string

Jump to

Keyboard shortcuts

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