middleware

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(

	userService interfaces.UserService,
	cfg *config.Config,
) gin.HandlerFunc

Auth 认证中间件

func ErrorHandler

func ErrorHandler() gin.HandlerFunc

ErrorHandler 是一个处理应用错误的中间件

func GetTenantIDFromContext

func GetTenantIDFromContext(ctx context.Context) (uint64, error)

GetTenantIDFromContext helper function to get tenant ID from context

func Logger

func Logger() gin.HandlerFunc

Logger middleware logs request details with request ID, input and output

func Recovery

func Recovery() gin.HandlerFunc

Recovery is a middleware that recovers from panics

func RequestID

func RequestID() gin.HandlerFunc

RequestID middleware adds a unique request ID to the context

Types

This section is empty.

Jump to

Keyboard shortcuts

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