Documentation ¶
Overview ¶
Package middleware provides HTTP middleware functions for the application.
Package middleware provides HTTP middleware functions for the application.
Package middleware provides HTTP middleware functions for the application.
Package middleware provides HTTP middleware functions for the application.
Package middleware provides HTTP middleware functions for the application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware interface { CheckAppAuth() gin.HandlerFunc Cors() gin.HandlerFunc RequestLogger() gin.HandlerFunc SetTraceID() gin.HandlerFunc }
Middleware interface defines the methods that should be implemented by middleware handlers.
func New ¶
func New(logger *logger.Manager, i18n *i18n.Manager, db map[string]*gorm.DB, redis map[string]*redis.Manager, traceID *trace.ID) Middleware
New creates and returns a new Middleware instance.
Parameters:
- logger: *logger.Manager - The logger manager.
- i18n: *i18n.Manager - The internationalization manager.
- db: map[string]*gorm.DB - A map of database connections.
- redis: map[string]*redis.Manager - A map of Redis managers.
- traceID: *trace.ID - The trace ID generator.
Returns:
- Middleware: A new Middleware instance.
Click to show internal directories.
Click to hide internal directories.