func UnaryServerInterceptor() grpc.UnaryServerInterceptor {
	return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (res interface{}, err error) {

		if req == nil {
			grpclog.Warningf("collection operator interceptor: empty request %+v", req)
			return handler(ctx, req)
		}

		res, err = handler(ctx, req)
		if err != nil {
			return res, err
		}

		// looking for op.PageInfo
		page := new(query.PageInfo)
		if err := unsetOp(res, page); err != nil {
			grpclog.Errorf("collection operator interceptor: failed to set page info - %s", err)
		}

		if err := SetPageInfo(ctx, page); err != nil {
			grpclog.Errorf("collection operator interceptor: failed to set page info - %s", err)
			return nil, err
		}

		return
	}
}
// UnaryServerInterceptor returns grpc.UnaryServerInterceptor
// that should be used as a middleware if an user's request message
// defines any of collection operators.
//
// Returned middleware populates collection operators from gRPC metadata if
// they defined in a request message.
UnaryServerInterceptor returns grpc.UnaryServerInterceptor
that should be used as a middleware if an user's request message
defines any of collection operators.

Returned middleware populates collection operators from gRPC metadata if
they defined in a request message.
// UnaryServerInterceptor returns grpc . UnaryServerInterceptor // that should be used as a middleware if an user ' s request message // defines any of collection operators . // // Returned middleware populates collection operators from gRPC metadata if // they defined in a request message .
func UnaryServerInterceptor() grpc.UnaryServerInterceptor {
	return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (res interface{}, err error) {
		if req == nil {
			grpclog.Warningf("collection operator interceptor: empty request %+v", req)
			return handler(ctx, req)
		}
		res, err = handler(ctx, req)
		if err != nil {
			return res, err
		}
		page := new(query.PageInfo)
		if err := unsetOp(res, page); err != nil {
			grpclog.Errorf("collection operator interceptor: failed to set page info - %s", err)
		}
		if err := SetPageInfo(ctx, page); err != nil {
			grpclog.Errorf("collection operator interceptor: failed to set page info - %s", err)
			return nil, err
		}
		return
	}
}
func UnaryServerInterceptor ( ) grpc . UnaryServerInterceptor { return func ( ctx context . Context , req interface { } , info * grpc . UnaryServerInfo , handler grpc . UnaryHandler ) ( res interface { } , err error ) { if req == nil { grpclog . Warningf ( " " , req ) return handler ( ctx , req ) } res , err = handler ( ctx , req ) if err != nil { return res , err } page := new ( query . PageInfo ) if err := unsetOp ( res , page ) ; err != nil { grpclog . Errorf ( " " , err ) } if err := SetPageInfo ( ctx , page ) ; err != nil { grpclog . Errorf ( " " , err ) return nil , err } return } }
UnaryServerInterceptor returns grpc.UnaryServerInterceptor
that should be used as a middleware if an user's request message
defines any of collection operators.
UnaryServerInterceptor returns grpc . UnaryServerInterceptor that should be used as a middleware if an user ' s request message defines any of collection operators .
// looking for op.PageInfo