Documentation
¶
Overview ¶
Package middleware provides HTTP middleware for the API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectionFromContext ¶
func ConnectionFromContext(ctx context.Context) database.Connection
ConnectionFromContext retrieves the database connection from the context. Returns nil if no connection is present.
func DatabaseTypeFromContext ¶
func DatabaseTypeFromContext(ctx context.Context) database.DatabaseType
DatabaseTypeFromContext retrieves the database type from the context. Returns an empty string if no type is present.
func WithConnection ¶
WithConnection is middleware that injects a database connection into the request context. This is useful when you need to access the database type or connection in handlers.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.