Documentation ¶
Overview ¶
Package paginationmw provides transport middlewares for dealing with pagination.
Index ¶
- Variables
- func InterceptServerRequest(ctx context.Context) (pagination.Request, error)
- func StreamServerInterceptor(srv interface{}, ss grpc.ServerStream, _ *grpc.StreamServerInfo, ...) error
- func UnaryServerInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, ...) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Debug = false
Debug is used to turn on debug logging for this package.
Functions ¶
func InterceptServerRequest ¶
func InterceptServerRequest(ctx context.Context) (pagination.Request, error)
InterceptServerRequest returns a new Response instance from the provided context, or returns an error if it fails, or finds the context to be invalid.
func StreamServerInterceptor ¶
func StreamServerInterceptor(srv interface{}, ss grpc.ServerStream, _ *grpc.StreamServerInfo, handler grpc.StreamHandler) error
StreamServerInterceptor is a gRPC server-side interceptor that checks that pagination provided is valid for streaming procedures
func UnaryServerInterceptor ¶
func UnaryServerInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
UnaryServerInterceptor is a gRPC server-side interceptor that checks that pagination is provided is valid for unary procedures
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.