middlewares

package
v0.0.0-...-1d41e02 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cors

func Cors(next http.Handler) http.Handler

Cors allow all cors

func Logging

func Logging(next http.Handler) http.Handler

Logging middleware that logs all requests

func PanicRecovery

func PanicRecovery(next http.Handler) http.Handler

PanicRecovery prevent server shutdowns when a panic occurs

Types

type StatusRecorder

type StatusRecorder struct {
	http.ResponseWriter
	Status int
	Size   int
}

func (*StatusRecorder) Write

func (r *StatusRecorder) Write(buf []byte) (int, error)

func (*StatusRecorder) WriteHeader

func (r *StatusRecorder) WriteHeader(status int)

Jump to

Keyboard shortcuts

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