Documentation

Overview

Package middleware contains some basic middlewares.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithContextTimeout

func WithContextTimeout(timeout time.Duration) router.Middleware

WithContextTimeout returns a middleware that adds a timeout to the context.

func WithPanicCatcher

func WithPanicCatcher(c *router.Context, next router.Handler)

WithPanicCatcher is a middleware that catches panics, dumps stack trace to logging and returns HTTP 500.

Types

This section is empty.