middleware

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSecretInterceptor

func CheckSecretInterceptor(ctx context.Context,
	req interface{},
	info *grpc.UnaryServerInfo,
	handler grpc.UnaryHandler) (interface{}, error)

CheckSecretInterceptor check token valid

func CheckToken

func CheckToken(token string) (string, string, bool)

CheckToken check token is valid

func LoggerInterceptor

func LoggerInterceptor(ctx context.Context,
	req interface{},
	info *grpc.UnaryServerInfo,
	handler grpc.UnaryHandler) (interface{}, error)

LoggerInterceptor grpc middleware log

func Oprtation

func Oprtation() func(c *gin.Context)

Oprtation save all user operate log

func PermissionControl

func PermissionControl() func(c *gin.Context)

PermissionControl 权限控制middle

func RecoveryInterceptor

func RecoveryInterceptor(ctx context.Context,
	req interface{},
	info *grpc.UnaryServerInfo,
	handler grpc.UnaryHandler) (interface{}, error)

RecoveryInterceptor get rpc panic

func ZapLogger

func ZapLogger() func(c *gin.Context)

ZapLogger zap logget middle

Types

This section is empty.

Jump to

Keyboard shortcuts

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