Documentation ¶
Overview ¶
Package wrap inserts some common logic, before calling the actual handler func.
Index ¶
- func LogAndRecover(innerHandler http.Handler) http.Handler
- func MustAdmin(innerFunc http.HandlerFunc) http.Handler
- func MustAdminHandler(innerHandler http.Handler) http.Handler
- func MustLogin(innerFunc http.HandlerFunc) http.Handler
- func UseAdmin(inner http.Handler, aParam int) http.Handler
- func UseLogRecover(inner http.Handler, aParam int) http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogAndRecover ¶
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 ¶
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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.