common

package
v1.12.3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMiddlewareChain

func CreateMiddlewareChain(cfg config.File, logger *slog.Logger, redisClient rediscli.Client, accountCache *accountcache.Manager, sessionStore sessions.Store) []gin.HandlerFunc

CreateMiddlewareChain constructs the standard middleware chain for frontend routes including sessions, CSRF, Lua context, language handling and endpoint protection.

func RouterGroup

func RouterGroup(cfg config.File, logger *slog.Logger, redisClient rediscli.Client, accountCache *accountcache.Manager, path string, router gin.IRouter, store sessions.Store, getHandler gin.HandlerFunc, postHandler gin.HandlerFunc) *gin.RouterGroup

RouterGroup creates a new group under the given path with the standard frontend middleware and wires GET and POST handlers matching the old pattern.

Types

This section is empty.

Jump to

Keyboard shortcuts

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