handlers

package
v0.0.0-...-ef1509a Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 21 Imported by: 6

Documentation

Index

Constants

View Source
const (
	RouterGroupsReadScope   = "routing.router_groups.read"
	RouterGroupsWriteScope  = "routing.router_groups.write"
	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(uaaClient uaaclient.TokenValidator, database db.DB, logger lager.Logger, stats metrics.PartialStatsdClient) *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 []models.Route, maxTTL int) *routing_api.Error
	ValidateDelete(routes []models.Route) *routing_api.Error

	ValidateCreateTcpRouteMapping(tcpRouteMappings []models.TcpRouteMapping, routerGroups models.RouterGroups, maxTTL int) *routing_api.Error
	ValidateDeleteTcpRouteMapping(tcpRouteMappings []models.TcpRouteMapping) *routing_api.Error
}

type RouterGroupsHandler

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

func NewRouteGroupsHandler

func NewRouteGroupsHandler(uaaClient uaaclient.TokenValidator, logger lager.Logger, db db.DB) *RouterGroupsHandler

func (*RouterGroupsHandler) CreateRouterGroup

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

func (*RouterGroupsHandler) DeleteRouterGroup

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

func (*RouterGroupsHandler) ListRouterGroups

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

func (*RouterGroupsHandler) UpdateRouterGroup

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

type RoutesHandler

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

func NewRoutesHandler

func NewRoutesHandler(uaaClient uaaclient.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(uaaClient uaaclient.TokenValidator, validator RouteValidator, database db.DB, ttl int, 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 []models.Route, maxTTL int) *routing_api.Error

func (Validator) ValidateCreateTcpRouteMapping

func (v Validator) ValidateCreateTcpRouteMapping(tcpRouteMappings []models.TcpRouteMapping, routerGroups models.RouterGroups, maxTTL int) *routing_api.Error

func (Validator) ValidateDelete

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

func (Validator) ValidateDeleteTcpRouteMapping

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

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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