zin

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2018 License: MIT Imports: 4 Imported by: 5

README

zin

Zin is a toolbox for httprouter

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapF

func WrapH

func WrapH(h http.Handler) httprouter.Handle

Types

type Middleware

type Middleware func(httprouter.Handle) httprouter.Handle

func WrapM

func WrapM(sm StdFuncMiddlware) Middleware

func WrapS

func WrapS(sm StdMiddlware) Middleware

type MuxGroup

type MuxGroup struct {
	// contains filtered or unexported fields
}

func NewGroup

func NewGroup(basePath string, middlewares ...Middleware) *MuxGroup

func (*MuxGroup) Group

func (g *MuxGroup) Group(path string, middlewares ...Middleware) *MuxGroup

func (*MuxGroup) NotFound

func (g *MuxGroup) NotFound(h http.Handler) http.Handler

func (*MuxGroup) Path

func (g *MuxGroup) Path(p string) string

func (*MuxGroup) R

func (g *MuxGroup) R(r RegisterFunc, p string, handle httprouter.Handle)

func (*MuxGroup) Use

func (g *MuxGroup) Use(middlewares ...Middleware)

type RegisterFunc

type RegisterFunc func(path string, handle httprouter.Handle)

type StdFuncMiddlware

type StdFuncMiddlware func(http.HandlerFunc) http.HandlerFunc

type StdMiddlware

type StdMiddlware func(http.Handler) http.Handler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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