wrap

package
v0.0.0-...-fe173bb Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package wrap inserts some common logic, before calling the actual handler func.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogAndRecover

func LogAndRecover(innerHandler http.Handler) http.Handler

LogAndRecover takes a single handler and returns a new wrapped http handler.

Magically, we can pass in an *entire mux* - having *all* its routes wrapped into recover

func MustAdmin

func MustAdmin(innerFunc http.HandlerFunc) http.Handler

MustAdmin takes a handler *func* and returns a wrapped around http handler.

func MustAdminHandler

func MustAdminHandler(innerHandler http.Handler) http.Handler

MustAdminHandler takes a handler and returns a wrapped around http handler.

func MustLogin

func MustLogin(innerFunc http.HandlerFunc) http.Handler

MustLogin takes a handler *func* and returns a wrapped around http handler.

func UseAdmin

func UseAdmin(inner http.Handler, aParam int) http.Handler

UseAdmin is an alternative way to create the same middle ware.

func UseLogRecover

func UseLogRecover(inner http.Handler, aParam int) http.Handler

UseLogRecover is an alternative way to create the same middle ware

Types

This section is empty.

Jump to

Keyboard shortcuts

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