mw

package
v0.0.49-alpha.26 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: Apache-2.0 Imports: 23 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CorsHandler

func CorsHandler() gin.HandlerFunc

CorsHandler gin cross-domain configuration.

func CreateToken added in v0.0.49

func CreateToken(userID string, accessSecret string, accessExpire int64, platformID int) (string, error)

func GinParseOperationID

func GinParseOperationID() gin.HandlerFunc

func GinParseToken added in v0.0.49

func GinParseToken(secretKey jwt.Keyfunc, whitelist []string) gin.HandlerFunc

func GrpcClient

func GrpcClient() grpc.DialOption

func GrpcServer

func GrpcServer() grpc.ServerOption

func GrpcServerWithRespNilReplace

func GrpcServerWithRespNilReplace() grpc.ServerOption

func InterceptChain

func InterceptChain(intercepts ...grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor

func ReplaceNil added in v0.0.49

func ReplaceNil(data *any)

ReplaceNil initialization nil values. It will panic if nil is passed in.

func RpcClientInterceptor

func RpcClientInterceptor(ctx context.Context, method string, req, resp any, cc *grpc.ClientConn,
	invoker grpc.UnaryInvoker, opts ...grpc.CallOption) (err error)

func RpcServerInterceptor

func RpcServerInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error)

func RpcServerInterceptorWithRespNilReplace

func RpcServerInterceptorWithRespNilReplace(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error)

RpcServerInterceptorWithRespNilReplace This interceptor replaces nil maps and slices in the resp object and initializing them.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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