middlewares

package
v0.0.0-...-bee26d8 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2016 License: MIT Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorization

type Authorization struct {
}

func NewAuthorization

func NewAuthorization() *Authorization

This middleware check that an API key was given

func (*Authorization) ServeHTTP

func (a *Authorization) ServeHTTP(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)

The middleware handler

type Limiter

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

func NewLimiter

func NewLimiter(redisConnexion *redis.Client) *Limiter

This middleware check a client is not over the rate limit

func (*Limiter) ServeHTTP

func (l *Limiter) ServeHTTP(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)

The middleware handler

Jump to

Keyboard shortcuts

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