errorpages

package
v1.7.17 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2019 License: MIT Imports: 14 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	BackendName string

	FallbackURL string // Deprecated
	// contains filtered or unexported fields
}

Handler is a middleware that provides the custom error pages

func NewHandler

func NewHandler(errorPage *types.ErrorPage, backendName string) (*Handler, error)

NewHandler initializes the utils.ErrorHandler for the custom error pages

func (*Handler) PostLoad

func (h *Handler) PostLoad(backendHandler http.Handler) error

PostLoad adds backend handler if available

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)

Jump to

Keyboard shortcuts

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