middleware

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: Zlib Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicAuth

func BasicAuth() gin.HandlerFunc

BasicAuth is a middleware to check basic authentication. The auth middleware is used for WebDAV service, refer to: http://www.webdav.org/specs/rfc2617.html#n-basic-authentication-scheme

func CORS

func CORS() gin.HandlerFunc

CORS creates a new CORS Gin middleware with default options. It is a wrapper of cors.Cors handler.

func JWT

func JWT() gin.HandlerFunc

func LoggerToFile

func LoggerToFile() gin.HandlerFunc

LoggerToFile is a custom logger middleware, it writes logs to os.Stdout and a file. And uses a custom log format function.

func NoIndex

func NoIndex() gin.HandlerFunc

func Otel

func Otel(ctx context.Context) gin.HandlerFunc

func RequestID

func RequestID() gin.HandlerFunc

func Sentry

func Sentry() gin.HandlerFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

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