goerrors

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BadRequestError

type BadRequestError struct {
	StatusCode int
	// contains filtered or unexported fields
}

func NewBadRequestError

func NewBadRequestError(message string) BadRequestError

func (BadRequestError) Error

func (bre BadRequestError) Error() string

func (BadRequestError) GetStatusCode

func (bre BadRequestError) GetStatusCode() int

type GenericHttpError

type GenericHttpError interface {
	Error() string
	GetStatusCode() int
}

GenericHttpError defines an interface to handle custom http errors through out the code

type InternalServerError

type InternalServerError struct {
	StatusCode int
	// contains filtered or unexported fields
}

func NewInternalServerError

func NewInternalServerError(message string) InternalServerError

func (InternalServerError) Error

func (ise InternalServerError) Error() string

func (InternalServerError) GetStatusCode

func (ise InternalServerError) GetStatusCode() int

type NotFoundError

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

func NewNotFoundError

func NewNotFoundError(message string) NotFoundError

func (NotFoundError) Error

func (nfe NotFoundError) Error() string

func (NotFoundError) GetStatusCode

func (nfe NotFoundError) GetStatusCode() int

type UnauthorizedError

type UnauthorizedError struct {
	StatusCode int
	// contains filtered or unexported fields
}

func NewUnauthorizedError

func NewUnauthorizedError(message string) UnauthorizedError

func (UnauthorizedError) Error

func (ue UnauthorizedError) Error() string

func (UnauthorizedError) GetStatusCode

func (ue UnauthorizedError) GetStatusCode() int

Jump to

Keyboard shortcuts

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