middleware

package
v0.0.0-...-67df6f6 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticate

func Authenticate(next func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request)

Authenticate request only if authorization header is set

func Authorized

func Authorized(next func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request)

func Logging

func Logging(next http.Handler) http.Handler

func PanicRecoverer

func PanicRecoverer(next http.Handler) http.Handler

Types

type ContextAuthKey

type ContextAuthKey struct{}

type LogResponseWriter

type LogResponseWriter struct {
	http.ResponseWriter
	// contains filtered or unexported fields
}

func NewLogResponseWriter

func NewLogResponseWriter(w http.ResponseWriter) *LogResponseWriter

func (*LogResponseWriter) Write

func (w *LogResponseWriter) Write(body []byte) (int, error)

func (*LogResponseWriter) WriteHeader

func (w *LogResponseWriter) WriteHeader(code int)

Jump to

Keyboard shortcuts

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