Documentation ¶
Index ¶
- Variables
- func Auth() gin.HandlerFunc
- func CORS() gin.HandlerFunc
- func GRPCZap() grpc.UnaryServerInterceptor
- func GinZap(logger *zap.Logger, cfg config.Config) gin.HandlerFunc
- func OnlyAdmin() gin.HandlerFunc
- func RecoveryWithZap(logger *zap.Logger, stack bool) gin.HandlerFunc
- func RequestIdentifier() gin.HandlerFunc
- func SetupI18n() gin.HandlerFunc
- func VersionInfo() gin.HandlerFunc
- func Yourself() gin.HandlerFunc
- type Session
Constants ¶
This section is empty.
Variables ¶
View Source
var Version string = ""
Version contains version information
Functions ¶
func Auth ¶ added in v0.6.1
func Auth() gin.HandlerFunc
Auth is a middleware to check if the user is authorized to access the resource
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 OnlyAdmin ¶ added in v0.6.1
func OnlyAdmin() gin.HandlerFunc
OnlyAdmin check if the user is an administrator
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
func Yourself ¶ added in v0.6.1
func Yourself() gin.HandlerFunc
Yourself validates if the logged in user is the same as the request
Types ¶
Click to show internal directories.
Click to hide internal directories.