You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: validator/DOC.md
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -6,16 +6,16 @@
6
6
*[Index](#pkg-index)
7
7
8
8
## <aname="pkg-overview">Overview</a>
9
-
`grpc_validator` a generic request contents validator server-side middleware for gRPC.
9
+
`grpc_validator`is a generic request contents validator server-side middleware for gRPC.
10
10
11
11
### Request Validator Middleware
12
-
Validating input is important, and hard. It also causes a lot of boiler plate. This middleware
13
-
checks for the existance of a `Validate` method on each of the messages of a gRPC request. This
12
+
Validating input is important, and hard. It also causes a lot of boilerplate code. This middleware
13
+
checks for the existence of a `Validate` method on each of the messages of a gRPC request. This
14
14
includes the single request of the `Unary` calls, as well as each message of the inbound Stream calls.
15
-
In case of a validation failure, a`InvalidArgument` gRPC status is returned, alongside with a
15
+
In case of a validation failure, an`InvalidArgument` gRPC status is returned, along with a
16
16
description of the validation failure.
17
17
18
-
While it is generic, it was indented to be used with <ahref="https://github.com/mwitkow/go-proto-validators">https://github.com/mwitkow/go-proto-validators</a>,
18
+
While it is generic, it was intended to be used with <ahref="https://github.com/mwitkow/go-proto-validators">https://github.com/mwitkow/go-proto-validators</a>,
19
19
a Go protocol buffers codegen plugin that creates the `Validate` methods (including nested messages)
20
20
based on declarative options in the `.proto` files themselves. For example:
21
21
@@ -37,11 +37,11 @@ based on declarative options in the `.proto` files themselves. For example:
The `OuterMessage.Validate` would include validation of regexes, existance of the InnerMessage and
40
+
The `OuterMessage.Validate` would include validation of regexes, existence of the InnerMessage and
41
41
the range values within it. The `grpc_validator` middleware would then automatically use that to
42
42
check all messages processed by the server.
43
43
44
-
Please consult <ahref="https://github.com/mwitkow/go-proto-validators">https://github.com/mwitkow/go-proto-validators</a> for details of`protoc`invoation and
44
+
Please consult <ahref="https://github.com/mwitkow/go-proto-validators">https://github.com/mwitkow/go-proto-validators</a> for details on`protoc`invocation and
45
45
other parameters of customization.
46
46
47
47
## <aname="pkg-imports">Imported Packages</a>
@@ -61,7 +61,7 @@ other parameters of customization.
0 commit comments