validator

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StreamServerInterceptor

func StreamServerInterceptor() grpc.StreamServerInterceptor

StreamServerInterceptor returns a new streaming server interceptor that validates incoming messages.

The stage at which invalid messages will be rejected with `InvalidArgument` varies based on the type of the RPC. For `ServerStream` (1:m) requests, it will happen before reaching any userspace handlers. For `ClientStream` (n:1) or `BidiStream` (n:m) RPCs, the messages will be rejected on calls to `stream.Recv()`.

func UnaryServerInterceptor

func UnaryServerInterceptor() grpc.UnaryServerInterceptor

UnaryServerInterceptor returns a new unary server interceptor that validates incoming messages.

Invalid messages will be rejected with `InvalidArgument` before reaching any userspace handlers.

Types

type ValidationError

type ValidationError interface {
	errors.FieldValidationError
}

ValidationError deprecated, use errors.FieldValidationError

type ValidationMultiError

type ValidationMultiError interface {
	errors.MultiError
}

ValidationMultiError deprecated, use errors.MultiError

Jump to

Keyboard shortcuts

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