paginationmw

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package paginationmw provides transport middlewares for dealing with pagination.

Index

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.

Jump to

Keyboard shortcuts

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