recoverymiddleware

package
v0.0.0-...-fcb1268 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2018 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IndentJSON = false

Functions

This section is empty.

Types

type RecoveredErrorDetails

type RecoveredErrorDetails struct {
	OriginalError interface{}
	Error         string
	StackTrace    string
}

type Recovery

type Recovery struct {
	WithRecoveredError func(errDetails *RecoveredErrorDetails) *RecoveryResponse
}

func NewRecovery

func NewRecovery(withRecoveredError func(errDetails *RecoveredErrorDetails) *RecoveryResponse) *Recovery

func (*Recovery) ServeHTTP

func (rec *Recovery) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)

type RecoveryResponse

type RecoveryResponse struct {
	StatusCode         int
	JsonResponseObject interface{}
}

Jump to

Keyboard shortcuts

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