middleware

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2016 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthMiddleware

func NewAuthMiddleware(broker *broker.Broker, contextRoot string) authMiddleware

Types

type Middleware

type Middleware interface {
	WrapHandler(httputils.APIFunc) httputils.APIFunc
}

Middleware is an interface to allow the use of ordinary functions as API filters. Any struct that has the appropriate signature can be registered as a middleware.

type VersionMiddleware

type VersionMiddleware struct {
	*broker.Broker
	// contains filtered or unexported fields
}

VersionMiddleware is a middleware that validates the client and server versions.

func NewVersionMiddleware

func NewVersionMiddleware(broker *broker.Broker) VersionMiddleware

NewVersionMiddleware creates a new VersionMiddleware with the default versions

func (VersionMiddleware) WrapHandler

func (m VersionMiddleware) WrapHandler(handler httputils.APIFunc) httputils.APIFunc

WrapHandler returns a new handler function wrapping the previous one in the request chain

Jump to

Keyboard shortcuts

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