smallnest / rpcx

Best microservices framework in Go, like alibaba Dubbo, but with more features, Scale easily. Try it. Test it. If you feel it's better, use it! 𝐉𝐚𝐯𝐚有𝐝𝐮𝐛𝐛𝐨, 𝐆𝐨𝐥𝐚𝐧𝐠有𝐫𝐩𝐜𝐱! build for cloud!
https://rpcx.io
Other
8.11k stars 1.17k forks source link

question: how to use github.com/go-playground/validator to validate the request #850

Open westwin opened 6 months ago

westwin commented 6 months ago

I'm thinking if there's a way to write a server plugin to validate the request ? looks like server PreCall plugin can do this.

but what if with the use of AddHandler() ?

thanks

westwin commented 6 months ago

and btw, in https://github.com/smallnest/rpcx/blob/master/client/xclient.go, line 889 c.Plugins.DoPreCall(ctx, c.servicePath, serviceMethod, args)

what if the DoPreCall() returns an error ?

westwin commented 1 month ago

and btw, in https://github.com/smallnest/rpcx/blob/master/client/xclient.go, line 889 c.Plugins.DoPreCall(ctx, c.servicePath, serviceMethod, args)

what if the DoPreCall() returns an error ?

looks like a bug ?