middlewares

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthTokenContextKey contextKey = "authToken"
	IDTokenContextKey   contextKey = "idToken"
)
View Source
const ChatCompletionsPath = "/v1/chat/completions"

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger added in v0.1.6

type Logger interface {
	Middleware() gin.HandlerFunc
}

func NewLoggerMiddleware added in v0.1.6

func NewLoggerMiddleware(logger *logger.Logger) (Logger, error)

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 Telemetry added in v0.1.6

type Telemetry interface {
	Middleware() gin.HandlerFunc
}

func NewTelemetryMiddleware added in v0.1.6

func NewTelemetryMiddleware(cfg config.Config, telemetry otel.OpenTelemetry, logger logger.Logger) (Telemetry, error)

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

Jump to

Keyboard shortcuts

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