add sql wrapper tests, regen

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2023-01-07 19:16:48 +03:00
parent de763a4f92
commit 7c71e65d02
50 changed files with 1635 additions and 273 deletions

View File

@@ -1,14 +1,13 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.19.4
// - protoc v3.21.12
// source: test.proto
package pb
import (
context "context"
proto "go.unistack.org/micro-tests/server/combo/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
@@ -23,8 +22,8 @@ const _ = grpc.SupportPackageIsVersion7
//
// 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 TestClient interface {
//option (micro.api.micro_service) = { client_wrappers: ["one","two"]; };
Call(ctx context.Context, in *proto.CallReq, opts ...grpc.CallOption) (*proto.CallRsp, error)
// option (micro.api.micro_service) = { client_wrappers: ["one","two"]; };
Call(ctx context.Context, in *CallReq, opts ...grpc.CallOption) (*CallRsp, error)
}
type testClient struct {
@@ -35,8 +34,8 @@ func NewTestClient(cc grpc.ClientConnInterface) TestClient {
return &testClient{cc}
}
func (c *testClient) Call(ctx context.Context, in *proto.CallReq, opts ...grpc.CallOption) (*proto.CallRsp, error) {
out := new(proto.CallRsp)
func (c *testClient) Call(ctx context.Context, in *CallReq, opts ...grpc.CallOption) (*CallRsp, error) {
out := new(CallRsp)
err := c.cc.Invoke(ctx, "/test.v1.Test/Call", in, out, opts...)
if err != nil {
return nil, err
@@ -48,8 +47,8 @@ func (c *testClient) Call(ctx context.Context, in *proto.CallReq, opts ...grpc.C
// All implementations must embed UnimplementedTestServer
// for forward compatibility
type TestServer interface {
//option (micro.api.micro_service) = { client_wrappers: ["one","two"]; };
Call(context.Context, *proto.CallReq) (*proto.CallRsp, error)
// option (micro.api.micro_service) = { client_wrappers: ["one","two"]; };
Call(context.Context, *CallReq) (*CallRsp, error)
mustEmbedUnimplementedTestServer()
}
@@ -57,7 +56,7 @@ type TestServer interface {
type UnimplementedTestServer struct {
}
func (UnimplementedTestServer) Call(context.Context, *proto.CallReq) (*proto.CallRsp, error) {
func (UnimplementedTestServer) Call(context.Context, *CallReq) (*CallRsp, error) {
return nil, status.Errorf(codes.Unimplemented, "method Call not implemented")
}
func (UnimplementedTestServer) mustEmbedUnimplementedTestServer() {}
@@ -74,7 +73,7 @@ func RegisterTestServer(s grpc.ServiceRegistrar, srv TestServer) {
}
func _Test_Call_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(proto.CallReq)
in := new(CallReq)
if err := dec(in); err != nil {
return nil, err
}
@@ -86,7 +85,7 @@ func _Test_Call_Handler(srv interface{}, ctx context.Context, dec func(interface
FullMethod: "/test.v1.Test/Call",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestServer).Call(ctx, req.(*proto.CallReq))
return srv.(TestServer).Call(ctx, req.(*CallReq))
}
return interceptor(ctx, in, info, handler)
}