// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 // - protoc v3.12.4 // source: v1/command.proto package v1 import ( context "context" request "git.sxidc.com/service-supports/dps-sdk/pb/v1/request" response "git.sxidc.com/service-supports/dps-sdk/pb/v1/response" empty "github.com/golang/protobuf/ptypes/empty" 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 // CommandServiceClient is the client API for CommandService 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 CommandServiceClient interface { AutoMigrate(ctx context.Context, in *request.AutoMigrateRequest, opts ...grpc.CallOption) (*empty.Empty, error) Transaction(ctx context.Context, opts ...grpc.CallOption) (CommandService_TransactionClient, error) Insert(ctx context.Context, in *request.InsertRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error) InsertBatch(ctx context.Context, in *request.InsertBatchRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error) Delete(ctx context.Context, in *request.DeleteRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error) DeleteWhere(ctx context.Context, in *request.DeleteWhereRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error) Update(ctx context.Context, in *request.UpdateRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error) UpdateWhere(ctx context.Context, in *request.UpdateWhereRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error) Replay(ctx context.Context, in *request.ReplayRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error) } type commandServiceClient struct { cc grpc.ClientConnInterface } func NewCommandServiceClient(cc grpc.ClientConnInterface) CommandServiceClient { return &commandServiceClient{cc} } func (c *commandServiceClient) AutoMigrate(ctx context.Context, in *request.AutoMigrateRequest, opts ...grpc.CallOption) (*empty.Empty, error) { out := new(empty.Empty) err := c.cc.Invoke(ctx, "/v1.CommandService/AutoMigrate", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *commandServiceClient) Transaction(ctx context.Context, opts ...grpc.CallOption) (CommandService_TransactionClient, error) { stream, err := c.cc.NewStream(ctx, &CommandService_ServiceDesc.Streams[0], "/v1.CommandService/Transaction", opts...) if err != nil { return nil, err } x := &commandServiceTransactionClient{stream} return x, nil } type CommandService_TransactionClient interface { Send(*request.TransactionOperation) error Recv() (*response.CommandStatementResponse, error) grpc.ClientStream } type commandServiceTransactionClient struct { grpc.ClientStream } func (x *commandServiceTransactionClient) Send(m *request.TransactionOperation) error { return x.ClientStream.SendMsg(m) } func (x *commandServiceTransactionClient) Recv() (*response.CommandStatementResponse, error) { m := new(response.CommandStatementResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *commandServiceClient) Insert(ctx context.Context, in *request.InsertRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error) { out := new(response.CommandStatementResponse) err := c.cc.Invoke(ctx, "/v1.CommandService/Insert", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *commandServiceClient) InsertBatch(ctx context.Context, in *request.InsertBatchRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error) { out := new(response.CommandStatementResponse) err := c.cc.Invoke(ctx, "/v1.CommandService/InsertBatch", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *commandServiceClient) Delete(ctx context.Context, in *request.DeleteRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error) { out := new(response.CommandStatementResponse) err := c.cc.Invoke(ctx, "/v1.CommandService/Delete", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *commandServiceClient) DeleteWhere(ctx context.Context, in *request.DeleteWhereRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error) { out := new(response.CommandStatementResponse) err := c.cc.Invoke(ctx, "/v1.CommandService/DeleteWhere", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *commandServiceClient) Update(ctx context.Context, in *request.UpdateRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error) { out := new(response.CommandStatementResponse) err := c.cc.Invoke(ctx, "/v1.CommandService/Update", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *commandServiceClient) UpdateWhere(ctx context.Context, in *request.UpdateWhereRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error) { out := new(response.CommandStatementResponse) err := c.cc.Invoke(ctx, "/v1.CommandService/UpdateWhere", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *commandServiceClient) Replay(ctx context.Context, in *request.ReplayRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error) { out := new(response.CommandStatementResponse) err := c.cc.Invoke(ctx, "/v1.CommandService/Replay", in, out, opts...) if err != nil { return nil, err } return out, nil } // CommandServiceServer is the server API for CommandService service. // All implementations must embed UnimplementedCommandServiceServer // for forward compatibility type CommandServiceServer interface { AutoMigrate(context.Context, *request.AutoMigrateRequest) (*empty.Empty, error) Transaction(CommandService_TransactionServer) error Insert(context.Context, *request.InsertRequest) (*response.CommandStatementResponse, error) InsertBatch(context.Context, *request.InsertBatchRequest) (*response.CommandStatementResponse, error) Delete(context.Context, *request.DeleteRequest) (*response.CommandStatementResponse, error) DeleteWhere(context.Context, *request.DeleteWhereRequest) (*response.CommandStatementResponse, error) Update(context.Context, *request.UpdateRequest) (*response.CommandStatementResponse, error) UpdateWhere(context.Context, *request.UpdateWhereRequest) (*response.CommandStatementResponse, error) Replay(context.Context, *request.ReplayRequest) (*response.CommandStatementResponse, error) mustEmbedUnimplementedCommandServiceServer() } // UnimplementedCommandServiceServer must be embedded to have forward compatible implementations. type UnimplementedCommandServiceServer struct { } func (UnimplementedCommandServiceServer) AutoMigrate(context.Context, *request.AutoMigrateRequest) (*empty.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method AutoMigrate not implemented") } func (UnimplementedCommandServiceServer) Transaction(CommandService_TransactionServer) error { return status.Errorf(codes.Unimplemented, "method Transaction not implemented") } func (UnimplementedCommandServiceServer) Insert(context.Context, *request.InsertRequest) (*response.CommandStatementResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Insert not implemented") } func (UnimplementedCommandServiceServer) InsertBatch(context.Context, *request.InsertBatchRequest) (*response.CommandStatementResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method InsertBatch not implemented") } func (UnimplementedCommandServiceServer) Delete(context.Context, *request.DeleteRequest) (*response.CommandStatementResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") } func (UnimplementedCommandServiceServer) DeleteWhere(context.Context, *request.DeleteWhereRequest) (*response.CommandStatementResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteWhere not implemented") } func (UnimplementedCommandServiceServer) Update(context.Context, *request.UpdateRequest) (*response.CommandStatementResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") } func (UnimplementedCommandServiceServer) UpdateWhere(context.Context, *request.UpdateWhereRequest) (*response.CommandStatementResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateWhere not implemented") } func (UnimplementedCommandServiceServer) Replay(context.Context, *request.ReplayRequest) (*response.CommandStatementResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Replay not implemented") } func (UnimplementedCommandServiceServer) mustEmbedUnimplementedCommandServiceServer() {} // UnsafeCommandServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to CommandServiceServer will // result in compilation errors. type UnsafeCommandServiceServer interface { mustEmbedUnimplementedCommandServiceServer() } func RegisterCommandServiceServer(s grpc.ServiceRegistrar, srv CommandServiceServer) { s.RegisterService(&CommandService_ServiceDesc, srv) } func _CommandService_AutoMigrate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(request.AutoMigrateRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CommandServiceServer).AutoMigrate(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/v1.CommandService/AutoMigrate", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CommandServiceServer).AutoMigrate(ctx, req.(*request.AutoMigrateRequest)) } return interceptor(ctx, in, info, handler) } func _CommandService_Transaction_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(CommandServiceServer).Transaction(&commandServiceTransactionServer{stream}) } type CommandService_TransactionServer interface { Send(*response.CommandStatementResponse) error Recv() (*request.TransactionOperation, error) grpc.ServerStream } type commandServiceTransactionServer struct { grpc.ServerStream } func (x *commandServiceTransactionServer) Send(m *response.CommandStatementResponse) error { return x.ServerStream.SendMsg(m) } func (x *commandServiceTransactionServer) Recv() (*request.TransactionOperation, error) { m := new(request.TransactionOperation) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func _CommandService_Insert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(request.InsertRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CommandServiceServer).Insert(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/v1.CommandService/Insert", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CommandServiceServer).Insert(ctx, req.(*request.InsertRequest)) } return interceptor(ctx, in, info, handler) } func _CommandService_InsertBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(request.InsertBatchRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CommandServiceServer).InsertBatch(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/v1.CommandService/InsertBatch", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CommandServiceServer).InsertBatch(ctx, req.(*request.InsertBatchRequest)) } return interceptor(ctx, in, info, handler) } func _CommandService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(request.DeleteRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CommandServiceServer).Delete(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/v1.CommandService/Delete", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CommandServiceServer).Delete(ctx, req.(*request.DeleteRequest)) } return interceptor(ctx, in, info, handler) } func _CommandService_DeleteWhere_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(request.DeleteWhereRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CommandServiceServer).DeleteWhere(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/v1.CommandService/DeleteWhere", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CommandServiceServer).DeleteWhere(ctx, req.(*request.DeleteWhereRequest)) } return interceptor(ctx, in, info, handler) } func _CommandService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(request.UpdateRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CommandServiceServer).Update(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/v1.CommandService/Update", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CommandServiceServer).Update(ctx, req.(*request.UpdateRequest)) } return interceptor(ctx, in, info, handler) } func _CommandService_UpdateWhere_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(request.UpdateWhereRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CommandServiceServer).UpdateWhere(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/v1.CommandService/UpdateWhere", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CommandServiceServer).UpdateWhere(ctx, req.(*request.UpdateWhereRequest)) } return interceptor(ctx, in, info, handler) } func _CommandService_Replay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(request.ReplayRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CommandServiceServer).Replay(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/v1.CommandService/Replay", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CommandServiceServer).Replay(ctx, req.(*request.ReplayRequest)) } return interceptor(ctx, in, info, handler) } // CommandService_ServiceDesc is the grpc.ServiceDesc for CommandService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var CommandService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "v1.CommandService", HandlerType: (*CommandServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AutoMigrate", Handler: _CommandService_AutoMigrate_Handler, }, { MethodName: "Insert", Handler: _CommandService_Insert_Handler, }, { MethodName: "InsertBatch", Handler: _CommandService_InsertBatch_Handler, }, { MethodName: "Delete", Handler: _CommandService_Delete_Handler, }, { MethodName: "DeleteWhere", Handler: _CommandService_DeleteWhere_Handler, }, { MethodName: "Update", Handler: _CommandService_Update_Handler, }, { MethodName: "UpdateWhere", Handler: _CommandService_UpdateWhere_Handler, }, { MethodName: "Replay", Handler: _CommandService_Replay_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Transaction", Handler: _CommandService_Transaction_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "v1/command.proto", }