router

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package router declares the ServerRouter contract wired into BaseServer.

Index

Constants

View Source
const (
	HealthPath            = "/healthz"
	ReadyPath             = "/readyz"
	VersionPath           = "/__/version"
	DocsPath              = "/docs/*"
	GatewaysPath          = "/v1/gateways"
	ProvidersCatalog      = "/v1/providers-catalog"
	ModelsCatalogPath     = "/v1/models-catalog"
	PoliciesCatalogPath   = "/v1/policies-catalog"
	MCPServersCatalogPath = "/v1/mcp-servers-catalog"
	PlaygroundTracePath   = "/v1/playground/traces/:trace_id"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminRouterDeps

type AdminRouterDeps struct {
	MiddlewareTransport *middleware.Transport
	AdminAuth           *middleware.AdminAuthMiddleware
	HealthHandler       *apihandler.HealthHandler
	VersionHandler      *apihandler.VersionHandler

	CreateGateway *gatewayhttp.CreateGatewayHandler
	GetGateway    *gatewayhttp.GetGatewayHandler
	ListGateway   *gatewayhttp.ListGatewayHandler
	UpdateGateway *gatewayhttp.UpdateGatewayHandler
	DeleteGateway *gatewayhttp.DeleteGatewayHandler

	CreateRegistry         *registryhttp.CreateRegistryHandler
	GetRegistry            *registryhttp.GetRegistryHandler
	ListRegistry           *registryhttp.ListRegistryHandler
	UpdateRegistry         *registryhttp.UpdateRegistryHandler
	DeleteRegistry         *registryhttp.DeleteRegistryHandler
	TestRegistryConnection *registryhttp.TestConnectionHandler
	ListRegistryTools      *registryhttp.ListRegistryToolsHandler

	CreatePolicy    *policyhttp.CreatePolicyHandler
	GetPolicy       *policyhttp.GetPolicyHandler
	ListPolicy      *policyhttp.ListPolicyHandler
	UpdatePolicy    *policyhttp.UpdatePolicyHandler
	DeletePolicy    *policyhttp.DeletePolicyHandler
	GlobalPolicy    *policyhttp.GlobalPolicyHandler
	DuplicatePolicy *policyhttp.DuplicatePolicyHandler

	CreateConsumer      *consumerhttp.CreateConsumerHandler
	GetConsumer         *consumerhttp.GetConsumerHandler
	ListConsumer        *consumerhttp.ListConsumerHandler
	UpdateConsumer      *consumerhttp.UpdateConsumerHandler
	DeleteConsumer      *consumerhttp.DeleteConsumerHandler
	ConsumerAssociation *consumerhttp.AssociationHandler

	CreateRole      *rolehttp.CreateRoleHandler
	GetRole         *rolehttp.GetRoleHandler
	ListRole        *rolehttp.ListRoleHandler
	UpdateRole      *rolehttp.UpdateRoleHandler
	DeleteRole      *rolehttp.DeleteRoleHandler
	RoleAssociation *rolehttp.AssociationHandler

	CreateAuth *authhttp.CreateAuthHandler
	GetAuth    *authhttp.GetAuthHandler
	ListAuth   *authhttp.ListAuthHandler
	UpdateAuth *authhttp.UpdateAuthHandler
	DeleteAuth *authhttp.DeleteAuthHandler

	ListProvidersCatalog  *cataloghttp.ListProvidersHandler
	ListModelsCatalog     *cataloghttp.ListModelsHandler
	ListPoliciesCatalog   *cataloghttp.ListPolicyCatalogHandler
	ListMCPServersCatalog *cataloghttp.ListMCPServersHandler

	GetTrace *playgroundhttp.GetTraceHandler
}

AdminRouterDeps groups every handler mounted by the admin plane. Adding a new aggregate only adds a field here, not a positional argument to NewAdminRouter.

type ServerRouter

type ServerRouter interface {
	BuildRoutes(router *fiber.App) error
}

ServerRouter attaches routes to a Fiber app.

func NewAdminRouter

func NewAdminRouter(deps AdminRouterDeps) ServerRouter

func NewMCPRouter

func NewMCPRouter(
	baseTransport *middleware.Transport,
	authTransport *middleware.Transport,
	healthHandler *apihandler.HealthHandler,
	mcpHandler *mcphttp.Handler,
	protectedResourceHandler *oauthhttp.ProtectedResourceHandler,
	authorizationServerHandler *oauthhttp.AuthorizationServerHandler,
	registerHandler *oauthhttp.RegisterHandler,
	authorizeHandler *oauthhttp.AuthorizeHandler,
	callbackHandler *oauthhttp.CallbackHandler,
	tokenHandler *oauthhttp.TokenHandler,
	connectHandler *oauthhttp.ConnectHandler,
	jwksHandler *oauthhttp.JWKSHandler,
) ServerRouter

func NewProxyRouter

func NewProxyRouter(
	middlewareTransport *middleware.Transport,
	healthHandler *apihandler.HealthHandler,
	proxyHandler *proxyhttp.ForwardedHandler,
) ServerRouter

Jump to

Keyboard shortcuts

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