Documentation
¶
Index ¶
Constants ¶
View Source
const ( AuthTokenContextKey contextKey = "authToken" IDTokenContextKey contextKey = "idToken" )
View Source
const ( // ChatCompletionsPath is the endpoint path for chat completions ChatCompletionsPath = "/v1/chat/completions" // MCPInternalHeader marks internal MCP requests to prevent middleware loops MCPInternalHeader = "X-MCP-Internal" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶ added in v0.7.5
type ErrorResponse struct {
Error string `json:"error"`
}
type Logger ¶ added in v0.1.6
type Logger interface {
Middleware() gin.HandlerFunc
}
type LoggerImpl ¶ added in v0.1.6
type LoggerImpl struct {
// contains filtered or unexported fields
}
func (LoggerImpl) Middleware ¶ added in v0.1.6
func (l LoggerImpl) Middleware() gin.HandlerFunc
type MCPMiddleware ¶ added in v0.7.0
type MCPMiddleware interface {
Middleware() gin.HandlerFunc
}
MCPMiddleware defines the interface for MCP middleware
func NewMCPMiddleware ¶ added in v0.7.0
func NewMCPMiddleware(registry providers.ProviderRegistry, inferenceGatewayClient providers.Client, mcpClient mcp.MCPClientInterface, logger logger.Logger, cfg config.Config) (MCPMiddleware, error)
NewMCPMiddleware creates a new MCP middleware instance
type MCPMiddlewareImpl ¶ added in v0.7.0
type MCPMiddlewareImpl struct {
// contains filtered or unexported fields
}
MCPMiddlewareImpl implements the MCP middleware
func (*MCPMiddlewareImpl) Middleware ¶ added in v0.7.0
func (m *MCPMiddlewareImpl) Middleware() gin.HandlerFunc
Middleware returns the MCP middleware handler
type NoopMCPMiddlewareImpl ¶ added in v0.7.0
type NoopMCPMiddlewareImpl struct{}
NoopMCPMiddlewareImpl is a no-op implementation of MCPMiddleware
func (*NoopMCPMiddlewareImpl) Middleware ¶ added in v0.7.0
func (n *NoopMCPMiddlewareImpl) Middleware() gin.HandlerFunc
Middleware returns the no-op middleware handler
type OIDCAuthenticator ¶
type OIDCAuthenticator interface {
Middleware() gin.HandlerFunc
}
func NewOIDCAuthenticatorMiddleware ¶ added in v0.1.6
func NewOIDCAuthenticatorMiddleware(logger logger.Logger, cfg config.Config) (OIDCAuthenticator, error)
NewOIDCAuthenticatorMiddleware creates a new OIDCAuthenticator instance
type OIDCAuthenticatorImpl ¶
type OIDCAuthenticatorImpl struct {
// contains filtered or unexported fields
}
func (*OIDCAuthenticatorImpl) Middleware ¶
func (a *OIDCAuthenticatorImpl) Middleware() gin.HandlerFunc
Middleware implementation of the OIDCAuthenticator interface
type OIDCAuthenticatorNoop ¶
type OIDCAuthenticatorNoop struct{}
func (*OIDCAuthenticatorNoop) Middleware ¶
func (a *OIDCAuthenticatorNoop) Middleware() gin.HandlerFunc
Noop implementation of the OIDCAuthenticator interface
type ProviderModelResult ¶ added in v0.7.3
type ProviderModelResult struct { Provider providers.IProvider ProviderModel string ProviderID *providers.Provider }
ProviderModelResult contains the result of provider and model determination
type Telemetry ¶ added in v0.1.6
type Telemetry interface {
Middleware() gin.HandlerFunc
}
func NewTelemetryMiddleware ¶ added in v0.1.6
type TelemetryImpl ¶ added in v0.1.6
type TelemetryImpl struct {
// contains filtered or unexported fields
}
func (*TelemetryImpl) Middleware ¶ added in v0.1.6
func (t *TelemetryImpl) Middleware() gin.HandlerFunc
Click to show internal directories.
Click to hide internal directories.