beego_middleware

package module
v0.0.0-...-3c14a9a Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2017 License: GPL-3.0 Imports: 2 Imported by: 0

README

Middleware in Beego

Basic example for creating middlewares in Beego framework.

Installation

Standard go get:

$ go get github.com/ojardila/beego_middleware
Dependencies
  go get github.com/astaxie/beego 
Configuring Beego Middleware

Add the following lines into the routers/routers.go file which will initialize the filter to run on all requests (BeforeStatic, BeforeRouter, BeforeStatic, AfterExec and FinishRouter)

 import "github.com/ojardila/beego_middleware"
 
 func init() {
    beego_keenio.InitMiddleware()

  
 }

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FunctionAfterExec

func FunctionAfterExec(ctx *context.Context)

func FunctionBeforeExec

func FunctionBeforeExec(ctx *context.Context)

func FunctionBeforeRouter

func FunctionBeforeRouter(ctx *context.Context)

func FunctionBeforeStatic

func FunctionBeforeStatic(ctx *context.Context)

func FunctionFinishRouter

func FunctionFinishRouter(ctx *context.Context)

func InitMiddleware

func InitMiddleware()

Types

This section is empty.

Jump to

Keyboard shortcuts

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