README

middlewares

Build Status GoDoc Go Report Card

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// MiddlewareStack on pREST
	MiddlewareStack []negroni.Handler

	// BaseStack Middlewares
	BaseStack = []negroni.Handler{
		negroni.Handler(negroni.NewRecovery()),
		negroni.Handler(negroni.NewLogger()),
		HandlerSet(),
	}
)

Functions

func AccessControl

func AccessControl() negroni.Handler

AccessControl is a middleware to handle permissions on tables in pREST

func Cors

func Cors(origin []string, headers []string) negroni.Handler

Cors middleware

func GetApp

func GetApp() *negroni.Negroni

GetApp get negroni

func HandlerSet

func HandlerSet() negroni.Handler

HandlerSet add content type header

func JwtMiddleware

func JwtMiddleware(key string, algo string) negroni.Handler

JwtMiddleware check if actual request have JWT

Types

This section is empty.

Directories

Path Synopsis