middleware

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version string = ""

Version contains version information

Functions

func CORS

func CORS() gin.HandlerFunc

func GRPCZap

func GRPCZap() grpc.UnaryServerInterceptor

GRPCZap is a request interceptor for logging all gRPC requests using Zap

func GinZap

func GinZap(logger *zap.Logger, cfg config.Config) gin.HandlerFunc

GinZap add a custom middleware from zap

func RecoveryWithZap

func RecoveryWithZap(logger *zap.Logger, stack bool) gin.HandlerFunc

RecoveryWithZap recovery middleware implementation with zap

func RequestIdentifier

func RequestIdentifier() gin.HandlerFunc

RequestIdentifier inject a UUIDv4 in all contexts for better tracking

func SetupI18n

func SetupI18n() gin.HandlerFunc

SetupI18n implements i18n configuration to be used in middleware

func VersionInfo

func VersionInfo() gin.HandlerFunc

VersionInfo add a version header to the request

Types

This section is empty.

Jump to

Keyboard shortcuts

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