Documentation
¶
Overview ¶
Package xmiddleware @Description TODO @Author jiangyang @Created 2021/9/11 4:12 下午
Index ¶
- func GrpcApm(apmURL, appName, appVersion, appEnv string) grpc.UnaryServerInterceptor
- func GrpcAuth(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- func GrpcLogger(traceName string) grpc.UnaryServerInterceptor
- func GrpcRecover(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (resp interface{}, err error)
- func GrpcValidate(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (resp interface{}, err error)
- func HttpErrorHandler(ctx context.Context, mux *runtime.ServeMux, m runtime.Marshaler, ...)
- func HttpLogger(traceName string) func(next http.Handler) http.Handler
- func HttpUse(h http.Handler, opt ...MiddlewareFunc) http.Handler
- type MiddlewareFunc
- type ServiceAuthFuncOverride
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GrpcApm ¶
func GrpcApm(apmURL, appName, appVersion, appEnv string) grpc.UnaryServerInterceptor
func GrpcAuth ¶
func GrpcAuth(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
func GrpcLogger ¶
func GrpcLogger(traceName string) grpc.UnaryServerInterceptor
func GrpcRecover ¶
func GrpcRecover(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)
func GrpcValidate ¶
func GrpcValidate(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)
func HttpErrorHandler ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.