middleware

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: MIT Imports: 17 Imported by: 0

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.

Jump to

Keyboard shortcuts

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