middleware

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authentication added in v0.2.0

func Authentication(basicAuthAuthenticator BasicAuthenticator) gin.HandlerFunc

func Authz added in v0.2.0

func Authz(enforcer *casbin.Enforcer) gin.HandlerFunc

func Zerolog

func Zerolog() gin.HandlerFunc

ZerologMiddleware returns a gin middleware that logs HTTP requests using zerolog. It logs the HTTP method, path, client IP, status code, latency, and other request details.

Types

type BasicAuthenticator added in v0.2.0

type BasicAuthenticator func(ctx context.Context, username, password string) (string, error)

Jump to

Keyboard shortcuts

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