mw

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2015 License: MIT Imports: 10 Imported by: 3

Documentation

Overview

Package original source: https://github.com/gorilla/handlers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompressHandler

func CompressHandler(h http.Handler) http.Handler

func CorsHandler

func CorsHandler(h http.Handler) http.Handler

func LogHandler

func LogHandler(next http.Handler) http.Handler

LogHandler logs the calls to the route

Types

type Middleware

type Middleware func(http.Handler) http.Handler

Middleware is our middelware definition (standandard)

type Stack

type Stack struct {
	Stack alice.Chain
}

Stack defines the method to stack middlewares to our running stack

func New

func New() *Stack

New get a handler for a new Middleware stack

func (*Stack) Add

func (s *Stack) Add(m ...Middleware)

Add adds a new middleware to the stack

func (*Stack) Then

func (s *Stack) Then(h http.Handler) http.Handler

Jump to

Keyboard shortcuts

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