views

package
v0.0.0-...-2b208be Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMethodNotAllowed = errors.New("error: Method is not allowed")
	ErrInvalidToken     = errors.New("error: Invalid Authorization token")
	ErrUserExists       = errors.New("user already exists")
)
View Source
var ErrHTTPStatusMap = map[string]int{
	pkg.ErrNotFound.Error():     fiber.StatusNotFound,
	pkg.ErrInvalidSlug.Error():  fiber.StatusBadRequest,
	pkg.ErrExists.Error():       fiber.StatusConflict,
	pkg.ErrNoContent.Error():    fiber.StatusNotFound,
	pkg.ErrDatabase.Error():     fiber.StatusInternalServerError,
	pkg.ErrUnauthorized.Error(): fiber.StatusUnauthorized,
	pkg.ErrForbidden.Error():    fiber.StatusForbidden,
	ErrMethodNotAllowed.Error(): fiber.StatusMethodNotAllowed,
	ErrInvalidToken.Error():     fiber.StatusBadRequest,
	ErrUserExists.Error():       fiber.StatusConflict,
}

Functions

This section is empty.

Types

type ErrView

type ErrView struct {
	Message string `json:"message"`
	Status  int    `json:"status"`
}

Jump to

Keyboard shortcuts

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