error

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DataNotFound = ApiError{

	StatusCode: http.StatusNotFound,
	// contains filtered or unexported fields
}
View Source
var Forbidden = ApiError{

	StatusCode: http.StatusForbidden,
	// contains filtered or unexported fields
}
View Source
var NotFound = ApiError{

	StatusCode: http.StatusNotFound,
	// contains filtered or unexported fields
}
View Source
var ServerError = ApiError{

	StatusCode: http.StatusInternalServerError,
	// contains filtered or unexported fields
}

Functions

This section is empty.

Types

type ApiError

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

func New

func New(err error, status int) ApiError

func NewGeneric

func NewGeneric(err error) ApiError

func (ApiError) Error

func (e ApiError) Error() string

func (ApiError) HTTPStatus

func (e ApiError) HTTPStatus() int

type HTTPError

type HTTPError interface {
	Error() string
	HTTPStatus() int
}

Jump to

Keyboard shortcuts

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