// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 // - protoc v3.12.4 // source: v1/sql.proto package v1 import ( context "context" request "git.sxidc.com/service-supports/ds-sdk/grpc_client/v1/request" response "git.sxidc.com/service-supports/ds-sdk/grpc_client/v1/response" 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 // SqlServiceClient is the client API for SqlService 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 SqlServiceClient interface { Transaction(ctx context.Context, opts ...grpc.CallOption) (SqlService_TransactionClient, error) } type sqlServiceClient struct { cc grpc.ClientConnInterface } func NewSqlServiceClient(cc grpc.ClientConnInterface) SqlServiceClient { return &sqlServiceClient{cc} } func (c *sqlServiceClient) Transaction(ctx context.Context, opts ...grpc.CallOption) (SqlService_TransactionClient, error) { stream, err := c.cc.NewStream(ctx, &SqlService_ServiceDesc.Streams[0], "/v1.SqlService/Transaction", opts...) if err != nil { return nil, err } x := &sqlServiceTransactionClient{stream} return x, nil } type SqlService_TransactionClient interface { Send(*request.TransactionOperation) error Recv() (*response.TransactionResponse, error) grpc.ClientStream } type sqlServiceTransactionClient struct { grpc.ClientStream } func (x *sqlServiceTransactionClient) Send(m *request.TransactionOperation) error { return x.ClientStream.SendMsg(m) } func (x *sqlServiceTransactionClient) Recv() (*response.TransactionResponse, error) { m := new(response.TransactionResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } // SqlServiceServer is the server API for SqlService service. // All implementations must embed UnimplementedSqlServiceServer // for forward compatibility type SqlServiceServer interface { Transaction(SqlService_TransactionServer) error mustEmbedUnimplementedSqlServiceServer() } // UnimplementedSqlServiceServer must be embedded to have forward compatible implementations. type UnimplementedSqlServiceServer struct { } func (UnimplementedSqlServiceServer) Transaction(SqlService_TransactionServer) error { return status.Errorf(codes.Unimplemented, "method Transaction not implemented") } func (UnimplementedSqlServiceServer) mustEmbedUnimplementedSqlServiceServer() {} // UnsafeSqlServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to SqlServiceServer will // result in compilation errors. type UnsafeSqlServiceServer interface { mustEmbedUnimplementedSqlServiceServer() } func RegisterSqlServiceServer(s grpc.ServiceRegistrar, srv SqlServiceServer) { s.RegisterService(&SqlService_ServiceDesc, srv) } func _SqlService_Transaction_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(SqlServiceServer).Transaction(&sqlServiceTransactionServer{stream}) } type SqlService_TransactionServer interface { Send(*response.TransactionResponse) error Recv() (*request.TransactionOperation, error) grpc.ServerStream } type sqlServiceTransactionServer struct { grpc.ServerStream } func (x *sqlServiceTransactionServer) Send(m *response.TransactionResponse) error { return x.ServerStream.SendMsg(m) } func (x *sqlServiceTransactionServer) Recv() (*request.TransactionOperation, error) { m := new(request.TransactionOperation) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } // SqlService_ServiceDesc is the grpc.ServiceDesc for SqlService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var SqlService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "v1.SqlService", HandlerType: (*SqlServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Transaction", Handler: _SqlService_Transaction_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "v1/sql.proto", }