handlers

package
v0.0.0-...-c259db3 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2015 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, + 1 more Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AdminRouteScope     = "route.admin"
	AdvertiseRouteScope = "route.advertise"
)

Variables

This section is empty.

Functions

func LogWrap

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

Types

type EventStreamHandler

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

func NewEventStreamHandler

func NewEventStreamHandler(token authentication.Token, database db.DB, logger lager.Logger) *EventStreamHandler

func (*EventStreamHandler) EventStream

func (h *EventStreamHandler) EventStream(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
}

type RoutesHandler

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

func NewRoutesHandler

func NewRoutesHandler(token authentication.Token, 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 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) ValidateDelete

func (v Validator) ValidateDelete(routes []db.Route) *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