fault

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: BSD-3-Clause Imports: 7 Imported by: 1

README

go-http-fault

Work in progress.

Documentation

Index

Constants

View Source
const ErrorKey string = "github.com/sfomuseum/go-http-fault#error"
View Source
const StatusKey string = "github.com/sfomuseum/go-http-fault#status"

Variables

This section is empty.

Functions

func AssignError

func AssignError(req *http.Request, err error, status int) *http.Request

func FaultHandler

func FaultHandler(wr io.Writer) (http.Handler, error)

func RetrieveError added in v0.0.2

func RetrieveError(req *http.Request) (int, error)

func TemplatedFaultHandler added in v0.0.2

func TemplatedFaultHandler(wr io.Writer, t *template.Template) (http.Handler, error)

Types

type FaultHandlerVars added in v0.0.2

type FaultHandlerVars struct {
	Status int
	Error  error
}

Jump to

Keyboard shortcuts

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