Documentation
¶
Index ¶
Constants ¶
View Source
const ( KubeClientCtxKey = "kubeClient" DynamicClientCtxKey = "dynClient" TokenCtxKey = "token" )
View Source
const (
LoggerCtxKey = "logger"
)
View Source
const (
WebsocketTokenHeader = "Sec-Websocket-Protocol"
)
Variables ¶
This section is empty.
Functions ¶
func LoggerMiddleware ¶
func LoggerMiddleware(baseLogger *zap.Logger) gin.HandlerFunc
LoggerMiddleware is a middleware that initializes a logger and sets it in the request context. The logger is initialized with a default "unknown" user. This middleware should be applied globally to ensure the logger is available in the context for all requests.
func TokenAuthMiddleware ¶
func TokenAuthMiddleware(tokenProvider auth.TokenProvider, scheme *runtime.Scheme) gin.HandlerFunc
TokenAuthMiddleware validates the Authorization header and sets up Kubernetes client.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.