http

package
v0.0.0-...-a4ecc4f Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadRequest     = NewError(http.StatusBadRequest, "bad_request")
	ErrUnauthorized   = NewError(http.StatusUnauthorized, "unauthorized")
	ErrInternalServer = NewError(http.StatusInternalServerError, "internal")
)

Functions

This section is empty.

Types

type Error

type Error struct {
	Code int    `json:"code"`
	Slug string `json:"slug"`
}

func NewError

func NewError(code int, slug string) *Error

func (Error) GetSlug

func (e Error) GetSlug() string

func (Error) GetStatusCode

func (e Error) GetStatusCode() int

Jump to

Keyboard shortcuts

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