handlers

package
v0.0.0-...-b61aaf9 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2016 License: Apache-2.0, Apache-2.0, BSD-2-Clause-Views, + 2 more Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RouterGroupsReadScope   = "routing.router_groups.read"
	RoutingRoutesReadScope  = "routing.routes.read"
	RoutingRoutesWriteScope = "routing.routes.write"
)

Variables

This section is empty.

Functions

func LogWrap

func LogWrap(handler http.Handler, logger lager.Logger) http.HandlerFunc

func NewTestRequest

func NewTestRequest(body interface{}) *http.Request

Types

type EventStreamHandler

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

func NewEventStreamHandler

func NewEventStreamHandler(tokenValidator authentication.TokenValidator, database db.DB, logger lager.Logger, stats metrics.PartialStatsdClient, stopChan <-chan struct{}) *EventStreamHandler

func (*EventStreamHandler) EventStream

func (h *EventStreamHandler) EventStream(w http.ResponseWriter, req *http.Request)

func (*EventStreamHandler) TcpEventStream

func (h *EventStreamHandler) TcpEventStream(w http.ResponseWriter, req *http.Request)

type RouteValidator

type RouteValidator interface {
	ValidateCreate(routes []db.Route, maxTTL int) *routing_api.Error
	ValidateDelete(routes []db.Route) *routing_api.Error

	ValidateCreateTcpRouteMapping(tcpRouteMappings []db.TcpRouteMapping) *routing_api.Error
	ValidateDeleteTcpRouteMapping(tcpRouteMappings []db.TcpRouteMapping) *routing_api.Error
}

type RouterGroupsHandler

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

func NewRouteGroupsHandler

func NewRouteGroupsHandler(tokenValidator authentication.TokenValidator, logger lager.Logger) *RouterGroupsHandler

func (*RouterGroupsHandler) ListRouterGroups

func (h *RouterGroupsHandler) ListRouterGroups(w http.ResponseWriter, req *http.Request)

type RoutesHandler

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

func NewRoutesHandler

func NewRoutesHandler(token authentication.TokenValidator, maxTTL int, validator RouteValidator, database db.DB, logger lager.Logger) *RoutesHandler

func (*RoutesHandler) Delete

func (h *RoutesHandler) Delete(w http.ResponseWriter, req *http.Request)

func (*RoutesHandler) List

func (h *RoutesHandler) List(w http.ResponseWriter, req *http.Request)

func (*RoutesHandler) Upsert

func (h *RoutesHandler) Upsert(w http.ResponseWriter, req *http.Request)

type TcpRouteMappingsHandler

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

func NewTcpRouteMappingsHandler

func NewTcpRouteMappingsHandler(tokenValidator authentication.TokenValidator, validator RouteValidator, database db.DB, logger lager.Logger) *TcpRouteMappingsHandler

func (*TcpRouteMappingsHandler) Delete

func (*TcpRouteMappingsHandler) List

func (*TcpRouteMappingsHandler) Upsert

type Validator

type Validator struct{}

func NewValidator

func NewValidator() Validator

func (Validator) ValidateCreate

func (v Validator) ValidateCreate(routes []db.Route, maxTTL int) *routing_api.Error

func (Validator) ValidateCreateTcpRouteMapping

func (v Validator) ValidateCreateTcpRouteMapping(tcpRouteMappings []db.TcpRouteMapping) *routing_api.Error

func (Validator) ValidateDelete

func (v Validator) ValidateDelete(routes []db.Route) *routing_api.Error

func (Validator) ValidateDeleteTcpRouteMapping

func (v Validator) ValidateDeleteTcpRouteMapping(tcpRouteMappings []db.TcpRouteMapping) *routing_api.Error

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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