Closed eaglemoor closed 6 years ago
We need add Validator interface for Request struct. When request struct fetch data from request and if it implement Validator interface, we can validate data in request and return error before handler.
type Validator interface { Valid() bool }
You can use middleware for that - it has access to the message struct. Set it up via desc.Apply(), passing transport.WithUnaryServerInterceptor()
We need add Validator interface for Request struct. When request struct fetch data from request and if it implement Validator interface, we can validate data in request and return error before handler.