Skip to content

teamlint/middleware

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repository information

This Repository contains all middleware for the Iris web framework version 5.

You can contribute also, just make a pull request, try to keep conversion, configuration file: './mymiddleware/config.go' & middleware: './mymiddleware/mymiddleware.go'.

Middleware is just handler(s) which served before the main handler.

How can I install a middleware?

$ go get -u gopkg.in/iris-contrib/middleware.v5/$FOLDERNAME

NOTE: When you install one middleware you will have all of them downloaded & installed, no need to re-run the go get foreach middeware.

How can I register middleware?

To a single route

iris.Get("/mypath",myMiddleware1,myMiddleware2,func(ctx *iris.Context){}, func(ctx *iris.Context){},myMiddleware5,myMainHandlerLast)

To a party of routes or subdomain

myparty := iris.Party("/myparty", myMiddleware1,func(ctx *iris.Context){},myMiddleware3)
{
	//....
}
// global
iris.UseFunc(func(ctx *iris.Context){}, myMiddleware2)

About

Community Middleware for the Iris web framework.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 99.9%
  • HTML 0.1%