cosmos-sdk/orm/internal/testpb/test_schema_query_grpc.pb.go
Aaron Craelius 2151427b5e
feat(orm): add query proto codegen (#13438)
## Description

This starts the implementation of approach (C) in #11774 by generating `_query.proto` files for `.proto` files which have ORM definitions. It does this using a new protoc plugin called `protoc-gen-go-cosmos-orm-proto`.

Please review `bank_query.proto` and `test_schema_query.proto` as these are the outputs of the codegen.

The approach taken does not attempt to do any sort of logical queries as discussed in #11774 and instead provides direct index access in the most simple and complete way that we can easily implement now. More advanced things in #11774 could be implemented later, but this should be possible to deliver relatively quickly and should allow developers to completely skip writing gRPC queries manually if they use ORM.

Note that the implementation of these queries can provide merkle proofs because the mapping to state is well known.

I did need to disable pulsar codegen in this PR because it doesn't support proto3 optionals which are needed here (depends on https://github.com/cosmos/cosmos-proto/issues/12). Fortunately, pulsar is 100% compatible with the official google codegen and there is no problem running ORM tests against the official codegen.



---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
2022-10-07 14:37:04 +00:00

602 lines
28 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc (unknown)
// source: testpb/test_schema_query.proto
package testpb
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// TestSchemaQueryClient is the client API for TestSchemaQuery service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type TestSchemaQueryClient interface {
// Get queries the ExampleTable table by its primary key.
GetExampleTable(ctx context.Context, in *GetExampleTableRequest, opts ...grpc.CallOption) (*GetExampleTableResponse, error)
// GetExampleTableByU64Str queries the ExampleTable table by its U64Str index
GetExampleTableByU64Str(ctx context.Context, in *GetExampleTableByU64StrRequest, opts ...grpc.CallOption) (*GetExampleTableByU64StrResponse, error)
// ListExampleTable queries the ExampleTable table using prefix and range queries against defined indexes.
ListExampleTable(ctx context.Context, in *ListExampleTableRequest, opts ...grpc.CallOption) (*ListExampleTableResponse, error)
// Get queries the ExampleAutoIncrementTable table by its primary key.
GetExampleAutoIncrementTable(ctx context.Context, in *GetExampleAutoIncrementTableRequest, opts ...grpc.CallOption) (*GetExampleAutoIncrementTableResponse, error)
// GetExampleAutoIncrementTableByX queries the ExampleAutoIncrementTable table by its X index
GetExampleAutoIncrementTableByX(ctx context.Context, in *GetExampleAutoIncrementTableByXRequest, opts ...grpc.CallOption) (*GetExampleAutoIncrementTableByXResponse, error)
// ListExampleAutoIncrementTable queries the ExampleAutoIncrementTable table using prefix and range queries against defined indexes.
ListExampleAutoIncrementTable(ctx context.Context, in *ListExampleAutoIncrementTableRequest, opts ...grpc.CallOption) (*ListExampleAutoIncrementTableResponse, error)
// GetExampleSingleton queries the ExampleSingleton singleton.
GetExampleSingleton(ctx context.Context, in *GetExampleSingletonRequest, opts ...grpc.CallOption) (*GetExampleSingletonResponse, error)
// Get queries the ExampleTimestamp table by its primary key.
GetExampleTimestamp(ctx context.Context, in *GetExampleTimestampRequest, opts ...grpc.CallOption) (*GetExampleTimestampResponse, error)
// ListExampleTimestamp queries the ExampleTimestamp table using prefix and range queries against defined indexes.
ListExampleTimestamp(ctx context.Context, in *ListExampleTimestampRequest, opts ...grpc.CallOption) (*ListExampleTimestampResponse, error)
// Get queries the SimpleExample table by its primary key.
GetSimpleExample(ctx context.Context, in *GetSimpleExampleRequest, opts ...grpc.CallOption) (*GetSimpleExampleResponse, error)
// GetSimpleExampleByUnique queries the SimpleExample table by its Unique index
GetSimpleExampleByUnique(ctx context.Context, in *GetSimpleExampleByUniqueRequest, opts ...grpc.CallOption) (*GetSimpleExampleByUniqueResponse, error)
// ListSimpleExample queries the SimpleExample table using prefix and range queries against defined indexes.
ListSimpleExample(ctx context.Context, in *ListSimpleExampleRequest, opts ...grpc.CallOption) (*ListSimpleExampleResponse, error)
// Get queries the ExampleAutoIncFieldName table by its primary key.
GetExampleAutoIncFieldName(ctx context.Context, in *GetExampleAutoIncFieldNameRequest, opts ...grpc.CallOption) (*GetExampleAutoIncFieldNameResponse, error)
// ListExampleAutoIncFieldName queries the ExampleAutoIncFieldName table using prefix and range queries against defined indexes.
ListExampleAutoIncFieldName(ctx context.Context, in *ListExampleAutoIncFieldNameRequest, opts ...grpc.CallOption) (*ListExampleAutoIncFieldNameResponse, error)
}
type testSchemaQueryClient struct {
cc grpc.ClientConnInterface
}
func NewTestSchemaQueryClient(cc grpc.ClientConnInterface) TestSchemaQueryClient {
return &testSchemaQueryClient{cc}
}
func (c *testSchemaQueryClient) GetExampleTable(ctx context.Context, in *GetExampleTableRequest, opts ...grpc.CallOption) (*GetExampleTableResponse, error) {
out := new(GetExampleTableResponse)
err := c.cc.Invoke(ctx, "/testpb.TestSchemaQuery/GetExampleTable", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *testSchemaQueryClient) GetExampleTableByU64Str(ctx context.Context, in *GetExampleTableByU64StrRequest, opts ...grpc.CallOption) (*GetExampleTableByU64StrResponse, error) {
out := new(GetExampleTableByU64StrResponse)
err := c.cc.Invoke(ctx, "/testpb.TestSchemaQuery/GetExampleTableByU64Str", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *testSchemaQueryClient) ListExampleTable(ctx context.Context, in *ListExampleTableRequest, opts ...grpc.CallOption) (*ListExampleTableResponse, error) {
out := new(ListExampleTableResponse)
err := c.cc.Invoke(ctx, "/testpb.TestSchemaQuery/ListExampleTable", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *testSchemaQueryClient) GetExampleAutoIncrementTable(ctx context.Context, in *GetExampleAutoIncrementTableRequest, opts ...grpc.CallOption) (*GetExampleAutoIncrementTableResponse, error) {
out := new(GetExampleAutoIncrementTableResponse)
err := c.cc.Invoke(ctx, "/testpb.TestSchemaQuery/GetExampleAutoIncrementTable", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *testSchemaQueryClient) GetExampleAutoIncrementTableByX(ctx context.Context, in *GetExampleAutoIncrementTableByXRequest, opts ...grpc.CallOption) (*GetExampleAutoIncrementTableByXResponse, error) {
out := new(GetExampleAutoIncrementTableByXResponse)
err := c.cc.Invoke(ctx, "/testpb.TestSchemaQuery/GetExampleAutoIncrementTableByX", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *testSchemaQueryClient) ListExampleAutoIncrementTable(ctx context.Context, in *ListExampleAutoIncrementTableRequest, opts ...grpc.CallOption) (*ListExampleAutoIncrementTableResponse, error) {
out := new(ListExampleAutoIncrementTableResponse)
err := c.cc.Invoke(ctx, "/testpb.TestSchemaQuery/ListExampleAutoIncrementTable", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *testSchemaQueryClient) GetExampleSingleton(ctx context.Context, in *GetExampleSingletonRequest, opts ...grpc.CallOption) (*GetExampleSingletonResponse, error) {
out := new(GetExampleSingletonResponse)
err := c.cc.Invoke(ctx, "/testpb.TestSchemaQuery/GetExampleSingleton", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *testSchemaQueryClient) GetExampleTimestamp(ctx context.Context, in *GetExampleTimestampRequest, opts ...grpc.CallOption) (*GetExampleTimestampResponse, error) {
out := new(GetExampleTimestampResponse)
err := c.cc.Invoke(ctx, "/testpb.TestSchemaQuery/GetExampleTimestamp", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *testSchemaQueryClient) ListExampleTimestamp(ctx context.Context, in *ListExampleTimestampRequest, opts ...grpc.CallOption) (*ListExampleTimestampResponse, error) {
out := new(ListExampleTimestampResponse)
err := c.cc.Invoke(ctx, "/testpb.TestSchemaQuery/ListExampleTimestamp", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *testSchemaQueryClient) GetSimpleExample(ctx context.Context, in *GetSimpleExampleRequest, opts ...grpc.CallOption) (*GetSimpleExampleResponse, error) {
out := new(GetSimpleExampleResponse)
err := c.cc.Invoke(ctx, "/testpb.TestSchemaQuery/GetSimpleExample", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *testSchemaQueryClient) GetSimpleExampleByUnique(ctx context.Context, in *GetSimpleExampleByUniqueRequest, opts ...grpc.CallOption) (*GetSimpleExampleByUniqueResponse, error) {
out := new(GetSimpleExampleByUniqueResponse)
err := c.cc.Invoke(ctx, "/testpb.TestSchemaQuery/GetSimpleExampleByUnique", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *testSchemaQueryClient) ListSimpleExample(ctx context.Context, in *ListSimpleExampleRequest, opts ...grpc.CallOption) (*ListSimpleExampleResponse, error) {
out := new(ListSimpleExampleResponse)
err := c.cc.Invoke(ctx, "/testpb.TestSchemaQuery/ListSimpleExample", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *testSchemaQueryClient) GetExampleAutoIncFieldName(ctx context.Context, in *GetExampleAutoIncFieldNameRequest, opts ...grpc.CallOption) (*GetExampleAutoIncFieldNameResponse, error) {
out := new(GetExampleAutoIncFieldNameResponse)
err := c.cc.Invoke(ctx, "/testpb.TestSchemaQuery/GetExampleAutoIncFieldName", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *testSchemaQueryClient) ListExampleAutoIncFieldName(ctx context.Context, in *ListExampleAutoIncFieldNameRequest, opts ...grpc.CallOption) (*ListExampleAutoIncFieldNameResponse, error) {
out := new(ListExampleAutoIncFieldNameResponse)
err := c.cc.Invoke(ctx, "/testpb.TestSchemaQuery/ListExampleAutoIncFieldName", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// TestSchemaQueryServer is the server API for TestSchemaQuery service.
// All implementations must embed UnimplementedTestSchemaQueryServer
// for forward compatibility
type TestSchemaQueryServer interface {
// Get queries the ExampleTable table by its primary key.
GetExampleTable(context.Context, *GetExampleTableRequest) (*GetExampleTableResponse, error)
// GetExampleTableByU64Str queries the ExampleTable table by its U64Str index
GetExampleTableByU64Str(context.Context, *GetExampleTableByU64StrRequest) (*GetExampleTableByU64StrResponse, error)
// ListExampleTable queries the ExampleTable table using prefix and range queries against defined indexes.
ListExampleTable(context.Context, *ListExampleTableRequest) (*ListExampleTableResponse, error)
// Get queries the ExampleAutoIncrementTable table by its primary key.
GetExampleAutoIncrementTable(context.Context, *GetExampleAutoIncrementTableRequest) (*GetExampleAutoIncrementTableResponse, error)
// GetExampleAutoIncrementTableByX queries the ExampleAutoIncrementTable table by its X index
GetExampleAutoIncrementTableByX(context.Context, *GetExampleAutoIncrementTableByXRequest) (*GetExampleAutoIncrementTableByXResponse, error)
// ListExampleAutoIncrementTable queries the ExampleAutoIncrementTable table using prefix and range queries against defined indexes.
ListExampleAutoIncrementTable(context.Context, *ListExampleAutoIncrementTableRequest) (*ListExampleAutoIncrementTableResponse, error)
// GetExampleSingleton queries the ExampleSingleton singleton.
GetExampleSingleton(context.Context, *GetExampleSingletonRequest) (*GetExampleSingletonResponse, error)
// Get queries the ExampleTimestamp table by its primary key.
GetExampleTimestamp(context.Context, *GetExampleTimestampRequest) (*GetExampleTimestampResponse, error)
// ListExampleTimestamp queries the ExampleTimestamp table using prefix and range queries against defined indexes.
ListExampleTimestamp(context.Context, *ListExampleTimestampRequest) (*ListExampleTimestampResponse, error)
// Get queries the SimpleExample table by its primary key.
GetSimpleExample(context.Context, *GetSimpleExampleRequest) (*GetSimpleExampleResponse, error)
// GetSimpleExampleByUnique queries the SimpleExample table by its Unique index
GetSimpleExampleByUnique(context.Context, *GetSimpleExampleByUniqueRequest) (*GetSimpleExampleByUniqueResponse, error)
// ListSimpleExample queries the SimpleExample table using prefix and range queries against defined indexes.
ListSimpleExample(context.Context, *ListSimpleExampleRequest) (*ListSimpleExampleResponse, error)
// Get queries the ExampleAutoIncFieldName table by its primary key.
GetExampleAutoIncFieldName(context.Context, *GetExampleAutoIncFieldNameRequest) (*GetExampleAutoIncFieldNameResponse, error)
// ListExampleAutoIncFieldName queries the ExampleAutoIncFieldName table using prefix and range queries against defined indexes.
ListExampleAutoIncFieldName(context.Context, *ListExampleAutoIncFieldNameRequest) (*ListExampleAutoIncFieldNameResponse, error)
mustEmbedUnimplementedTestSchemaQueryServer()
}
// UnimplementedTestSchemaQueryServer must be embedded to have forward compatible implementations.
type UnimplementedTestSchemaQueryServer struct {
}
func (UnimplementedTestSchemaQueryServer) GetExampleTable(context.Context, *GetExampleTableRequest) (*GetExampleTableResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetExampleTable not implemented")
}
func (UnimplementedTestSchemaQueryServer) GetExampleTableByU64Str(context.Context, *GetExampleTableByU64StrRequest) (*GetExampleTableByU64StrResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetExampleTableByU64Str not implemented")
}
func (UnimplementedTestSchemaQueryServer) ListExampleTable(context.Context, *ListExampleTableRequest) (*ListExampleTableResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListExampleTable not implemented")
}
func (UnimplementedTestSchemaQueryServer) GetExampleAutoIncrementTable(context.Context, *GetExampleAutoIncrementTableRequest) (*GetExampleAutoIncrementTableResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetExampleAutoIncrementTable not implemented")
}
func (UnimplementedTestSchemaQueryServer) GetExampleAutoIncrementTableByX(context.Context, *GetExampleAutoIncrementTableByXRequest) (*GetExampleAutoIncrementTableByXResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetExampleAutoIncrementTableByX not implemented")
}
func (UnimplementedTestSchemaQueryServer) ListExampleAutoIncrementTable(context.Context, *ListExampleAutoIncrementTableRequest) (*ListExampleAutoIncrementTableResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListExampleAutoIncrementTable not implemented")
}
func (UnimplementedTestSchemaQueryServer) GetExampleSingleton(context.Context, *GetExampleSingletonRequest) (*GetExampleSingletonResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetExampleSingleton not implemented")
}
func (UnimplementedTestSchemaQueryServer) GetExampleTimestamp(context.Context, *GetExampleTimestampRequest) (*GetExampleTimestampResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetExampleTimestamp not implemented")
}
func (UnimplementedTestSchemaQueryServer) ListExampleTimestamp(context.Context, *ListExampleTimestampRequest) (*ListExampleTimestampResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListExampleTimestamp not implemented")
}
func (UnimplementedTestSchemaQueryServer) GetSimpleExample(context.Context, *GetSimpleExampleRequest) (*GetSimpleExampleResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSimpleExample not implemented")
}
func (UnimplementedTestSchemaQueryServer) GetSimpleExampleByUnique(context.Context, *GetSimpleExampleByUniqueRequest) (*GetSimpleExampleByUniqueResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSimpleExampleByUnique not implemented")
}
func (UnimplementedTestSchemaQueryServer) ListSimpleExample(context.Context, *ListSimpleExampleRequest) (*ListSimpleExampleResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListSimpleExample not implemented")
}
func (UnimplementedTestSchemaQueryServer) GetExampleAutoIncFieldName(context.Context, *GetExampleAutoIncFieldNameRequest) (*GetExampleAutoIncFieldNameResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetExampleAutoIncFieldName not implemented")
}
func (UnimplementedTestSchemaQueryServer) ListExampleAutoIncFieldName(context.Context, *ListExampleAutoIncFieldNameRequest) (*ListExampleAutoIncFieldNameResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListExampleAutoIncFieldName not implemented")
}
func (UnimplementedTestSchemaQueryServer) mustEmbedUnimplementedTestSchemaQueryServer() {}
// UnsafeTestSchemaQueryServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to TestSchemaQueryServer will
// result in compilation errors.
type UnsafeTestSchemaQueryServer interface {
mustEmbedUnimplementedTestSchemaQueryServer()
}
func RegisterTestSchemaQueryServer(s grpc.ServiceRegistrar, srv TestSchemaQueryServer) {
s.RegisterService(&TestSchemaQuery_ServiceDesc, srv)
}
func _TestSchemaQuery_GetExampleTable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetExampleTableRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TestSchemaQueryServer).GetExampleTable(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/testpb.TestSchemaQuery/GetExampleTable",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestSchemaQueryServer).GetExampleTable(ctx, req.(*GetExampleTableRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TestSchemaQuery_GetExampleTableByU64Str_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetExampleTableByU64StrRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TestSchemaQueryServer).GetExampleTableByU64Str(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/testpb.TestSchemaQuery/GetExampleTableByU64Str",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestSchemaQueryServer).GetExampleTableByU64Str(ctx, req.(*GetExampleTableByU64StrRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TestSchemaQuery_ListExampleTable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListExampleTableRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TestSchemaQueryServer).ListExampleTable(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/testpb.TestSchemaQuery/ListExampleTable",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestSchemaQueryServer).ListExampleTable(ctx, req.(*ListExampleTableRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TestSchemaQuery_GetExampleAutoIncrementTable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetExampleAutoIncrementTableRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TestSchemaQueryServer).GetExampleAutoIncrementTable(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/testpb.TestSchemaQuery/GetExampleAutoIncrementTable",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestSchemaQueryServer).GetExampleAutoIncrementTable(ctx, req.(*GetExampleAutoIncrementTableRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TestSchemaQuery_GetExampleAutoIncrementTableByX_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetExampleAutoIncrementTableByXRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TestSchemaQueryServer).GetExampleAutoIncrementTableByX(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/testpb.TestSchemaQuery/GetExampleAutoIncrementTableByX",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestSchemaQueryServer).GetExampleAutoIncrementTableByX(ctx, req.(*GetExampleAutoIncrementTableByXRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TestSchemaQuery_ListExampleAutoIncrementTable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListExampleAutoIncrementTableRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TestSchemaQueryServer).ListExampleAutoIncrementTable(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/testpb.TestSchemaQuery/ListExampleAutoIncrementTable",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestSchemaQueryServer).ListExampleAutoIncrementTable(ctx, req.(*ListExampleAutoIncrementTableRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TestSchemaQuery_GetExampleSingleton_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetExampleSingletonRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TestSchemaQueryServer).GetExampleSingleton(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/testpb.TestSchemaQuery/GetExampleSingleton",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestSchemaQueryServer).GetExampleSingleton(ctx, req.(*GetExampleSingletonRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TestSchemaQuery_GetExampleTimestamp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetExampleTimestampRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TestSchemaQueryServer).GetExampleTimestamp(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/testpb.TestSchemaQuery/GetExampleTimestamp",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestSchemaQueryServer).GetExampleTimestamp(ctx, req.(*GetExampleTimestampRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TestSchemaQuery_ListExampleTimestamp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListExampleTimestampRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TestSchemaQueryServer).ListExampleTimestamp(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/testpb.TestSchemaQuery/ListExampleTimestamp",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestSchemaQueryServer).ListExampleTimestamp(ctx, req.(*ListExampleTimestampRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TestSchemaQuery_GetSimpleExample_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSimpleExampleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TestSchemaQueryServer).GetSimpleExample(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/testpb.TestSchemaQuery/GetSimpleExample",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestSchemaQueryServer).GetSimpleExample(ctx, req.(*GetSimpleExampleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TestSchemaQuery_GetSimpleExampleByUnique_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSimpleExampleByUniqueRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TestSchemaQueryServer).GetSimpleExampleByUnique(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/testpb.TestSchemaQuery/GetSimpleExampleByUnique",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestSchemaQueryServer).GetSimpleExampleByUnique(ctx, req.(*GetSimpleExampleByUniqueRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TestSchemaQuery_ListSimpleExample_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListSimpleExampleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TestSchemaQueryServer).ListSimpleExample(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/testpb.TestSchemaQuery/ListSimpleExample",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestSchemaQueryServer).ListSimpleExample(ctx, req.(*ListSimpleExampleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TestSchemaQuery_GetExampleAutoIncFieldName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetExampleAutoIncFieldNameRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TestSchemaQueryServer).GetExampleAutoIncFieldName(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/testpb.TestSchemaQuery/GetExampleAutoIncFieldName",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestSchemaQueryServer).GetExampleAutoIncFieldName(ctx, req.(*GetExampleAutoIncFieldNameRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TestSchemaQuery_ListExampleAutoIncFieldName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListExampleAutoIncFieldNameRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TestSchemaQueryServer).ListExampleAutoIncFieldName(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/testpb.TestSchemaQuery/ListExampleAutoIncFieldName",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestSchemaQueryServer).ListExampleAutoIncFieldName(ctx, req.(*ListExampleAutoIncFieldNameRequest))
}
return interceptor(ctx, in, info, handler)
}
// TestSchemaQuery_ServiceDesc is the grpc.ServiceDesc for TestSchemaQuery service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var TestSchemaQuery_ServiceDesc = grpc.ServiceDesc{
ServiceName: "testpb.TestSchemaQuery",
HandlerType: (*TestSchemaQueryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetExampleTable",
Handler: _TestSchemaQuery_GetExampleTable_Handler,
},
{
MethodName: "GetExampleTableByU64Str",
Handler: _TestSchemaQuery_GetExampleTableByU64Str_Handler,
},
{
MethodName: "ListExampleTable",
Handler: _TestSchemaQuery_ListExampleTable_Handler,
},
{
MethodName: "GetExampleAutoIncrementTable",
Handler: _TestSchemaQuery_GetExampleAutoIncrementTable_Handler,
},
{
MethodName: "GetExampleAutoIncrementTableByX",
Handler: _TestSchemaQuery_GetExampleAutoIncrementTableByX_Handler,
},
{
MethodName: "ListExampleAutoIncrementTable",
Handler: _TestSchemaQuery_ListExampleAutoIncrementTable_Handler,
},
{
MethodName: "GetExampleSingleton",
Handler: _TestSchemaQuery_GetExampleSingleton_Handler,
},
{
MethodName: "GetExampleTimestamp",
Handler: _TestSchemaQuery_GetExampleTimestamp_Handler,
},
{
MethodName: "ListExampleTimestamp",
Handler: _TestSchemaQuery_ListExampleTimestamp_Handler,
},
{
MethodName: "GetSimpleExample",
Handler: _TestSchemaQuery_GetSimpleExample_Handler,
},
{
MethodName: "GetSimpleExampleByUnique",
Handler: _TestSchemaQuery_GetSimpleExampleByUnique_Handler,
},
{
MethodName: "ListSimpleExample",
Handler: _TestSchemaQuery_ListSimpleExample_Handler,
},
{
MethodName: "GetExampleAutoIncFieldName",
Handler: _TestSchemaQuery_GetExampleAutoIncFieldName_Handler,
},
{
MethodName: "ListExampleAutoIncFieldName",
Handler: _TestSchemaQuery_ListExampleAutoIncFieldName_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "testpb/test_schema_query.proto",
}