util

package
v0.0.0-...-0716d42 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HTTPErrorMessages = map[int]echo.Map{
	http.StatusForbidden: {
		"Code":        "403",
		"Title":       "Forbidden",
		"Header":      "Denied!",
		"Description": "Sorry, you can't see that page. You'll find lots to explore on the home page.",
	},
	http.StatusNotFound: {
		"Code":        "404",
		"Title":       "Page not found",
		"Header":      "Something's missing.",
		"Description": "Sorry, we can't find that page. You'll find lots to explore on the home page.",
	},
	http.StatusGone: {
		"Code":        "410",
		"Title":       "Gone",
		"Header":      "And it's gone!",
		"Description": "Sorry, that page was deleted. You'll find lots to explore on the home page.",
	},
	http.StatusInternalServerError: {
		"Code":        "500",
		"Title":       "Internal server error",
		"Header":      "Uh-oh.",
		"Description": "We are already working to solve the problem.",
	},
	http.StatusBadGateway: {
		"Code":        "502",
		"Title":       "Bad gateway",
		"Header":      "D'oh!",
		"Description": "We are already working to solve the problem.",
	},
}

Functions

func AuthOptional

func AuthOptional(next echo.HandlerFunc) echo.HandlerFunc

func AuthRequired

func AuthRequired(next echo.HandlerFunc) echo.HandlerFunc

func HTTPErrorHandler

func HTTPErrorHandler(err error, c echo.Context)

func Slow

func Slow(next echo.HandlerFunc) echo.HandlerFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

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