123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
- // versions:
- // - protoc-gen-go-grpc v1.5.1
- // - protoc v3.12.4
- // source: v1/sql.proto
- package v1
- import (
- context "context"
- response "git.sxidc.com/service-supports/ds-sdk/grpc_client/v1/response"
- request "git.sxidc.com/service-supports/ds-sdk/grpc_client/v1/request"
- 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.64.0 or later.
- const _ = grpc.SupportPackageIsVersion9
- const (
- SqlService_Transaction_FullMethodName = "/v1.SqlService/Transaction"
- )
- // 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) (grpc.BidiStreamingClient[request.TransactionOperation, response.TransactionResponse], 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) (grpc.BidiStreamingClient[request.TransactionOperation, response.TransactionResponse], error) {
- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- stream, err := c.cc.NewStream(ctx, &SqlService_ServiceDesc.Streams[0], SqlService_Transaction_FullMethodName, cOpts...)
- if err != nil {
- return nil, err
- }
- x := &grpc.GenericClientStream[request.TransactionOperation, response.TransactionResponse]{ClientStream: stream}
- return x, nil
- }
- // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
- type SqlService_TransactionClient = grpc.BidiStreamingClient[request.TransactionOperation, response.TransactionResponse]
- // SqlServiceServer is the server API for SqlService service.
- // All implementations must embed UnimplementedSqlServiceServer
- // for forward compatibility.
- type SqlServiceServer interface {
- Transaction(grpc.BidiStreamingServer[request.TransactionOperation, response.TransactionResponse]) error
- mustEmbedUnimplementedSqlServiceServer()
- }
- // UnimplementedSqlServiceServer must be embedded to have
- // forward compatible implementations.
- //
- // NOTE: this should be embedded by value instead of pointer to avoid a nil
- // pointer dereference when methods are called.
- type UnimplementedSqlServiceServer struct{}
- func (UnimplementedSqlServiceServer) Transaction(grpc.BidiStreamingServer[request.TransactionOperation, response.TransactionResponse]) error {
- return status.Errorf(codes.Unimplemented, "method Transaction not implemented")
- }
- func (UnimplementedSqlServiceServer) mustEmbedUnimplementedSqlServiceServer() {}
- func (UnimplementedSqlServiceServer) testEmbeddedByValue() {}
- // 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) {
- // If the following call pancis, it indicates UnimplementedSqlServiceServer was
- // embedded by pointer and is nil. This will cause panics if an
- // unimplemented method is ever invoked, so we test this at initialization
- // time to prevent it from happening at runtime later due to I/O.
- if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
- t.testEmbeddedByValue()
- }
- s.RegisterService(&SqlService_ServiceDesc, srv)
- }
- func _SqlService_Transaction_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(SqlServiceServer).Transaction(&grpc.GenericServerStream[request.TransactionOperation, response.TransactionResponse]{ServerStream: stream})
- }
- // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
- type SqlService_TransactionServer = grpc.BidiStreamingServer[request.TransactionOperation, response.TransactionResponse]
- // 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",
- }
|