httperror

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPError

type HTTPError struct {
	Detail string
	Code   int32
}

func BadRequest

func BadRequest(format string, args ...interface{}) *HTTPError

BadRequest is a helper to return a 400 error

func Forbidden

func Forbidden(format string, args ...interface{}) *HTTPError

Forbidden is a helper to return a 403 error

func InternalError added in v1.5.1

func InternalError(format string, args ...interface{}) *HTTPError

Internal is a helper to return a 404 error

func NotAuthorized

func NotAuthorized(format string, args ...interface{}) *HTTPError

NotAuthorized is a helper to return a 401 error

func NotFound

func NotFound(format string, args ...interface{}) *HTTPError

NotFound is a helper to return a 404 error

func (*HTTPError) Error

func (e *HTTPError) Error() string

Jump to

Keyboard shortcuts

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