handlers

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: Apache-2.0 Imports: 21 Imported by: 2 modules, 9 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

	ValidateCreateTcpRouteMappings(tcpRouteMappings []models.TcpRouteMapping, routerGroups models.RouterGroups, maxTTL int) *routing_api.Error
	ValidateCreateTcpRouteMapping(tcpRouteMapping models.TcpRouteMapping, similarTcpRouteMappings []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(tcpRouteMapping models.TcpRouteMapping, similarTcpRouteMappings []models.TcpRouteMapping, routerGroups models.RouterGroups, maxTTL int) *routing_api.Error

func (Validator) ValidateCreateTcpRouteMappings deprecated

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

ValidateCreateTcpRouteMappings validates an array of TcpRouteMappings

Deprecated: use ValidateCreateTcpRouteMapping

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