github.com/ledgerwatch/erigon-lib@v1.0.0/gointerfaces/downloader/downloader_grpc.pb.go (about)

     1  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
     2  // versions:
     3  // - protoc-gen-go-grpc v1.3.0
     4  // - protoc             v4.24.2
     5  // source: downloader/downloader.proto
     6  
     7  package downloader
     8  
     9  import (
    10  	context "context"
    11  	grpc "google.golang.org/grpc"
    12  	codes "google.golang.org/grpc/codes"
    13  	status "google.golang.org/grpc/status"
    14  	emptypb "google.golang.org/protobuf/types/known/emptypb"
    15  )
    16  
    17  // This is a compile-time assertion to ensure that this generated file
    18  // is compatible with the grpc package it is being compiled against.
    19  // Requires gRPC-Go v1.32.0 or later.
    20  const _ = grpc.SupportPackageIsVersion7
    21  
    22  const (
    23  	Downloader_Download_FullMethodName = "/downloader.Downloader/Download"
    24  	Downloader_Verify_FullMethodName   = "/downloader.Downloader/Verify"
    25  	Downloader_Stats_FullMethodName    = "/downloader.Downloader/Stats"
    26  )
    27  
    28  // DownloaderClient is the client API for Downloader service.
    29  //
    30  // 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.
    31  type DownloaderClient interface {
    32  	Download(ctx context.Context, in *DownloadRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
    33  	Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
    34  	Stats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatsReply, error)
    35  }
    36  
    37  type downloaderClient struct {
    38  	cc grpc.ClientConnInterface
    39  }
    40  
    41  func NewDownloaderClient(cc grpc.ClientConnInterface) DownloaderClient {
    42  	return &downloaderClient{cc}
    43  }
    44  
    45  func (c *downloaderClient) Download(ctx context.Context, in *DownloadRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
    46  	out := new(emptypb.Empty)
    47  	err := c.cc.Invoke(ctx, Downloader_Download_FullMethodName, in, out, opts...)
    48  	if err != nil {
    49  		return nil, err
    50  	}
    51  	return out, nil
    52  }
    53  
    54  func (c *downloaderClient) Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
    55  	out := new(emptypb.Empty)
    56  	err := c.cc.Invoke(ctx, Downloader_Verify_FullMethodName, in, out, opts...)
    57  	if err != nil {
    58  		return nil, err
    59  	}
    60  	return out, nil
    61  }
    62  
    63  func (c *downloaderClient) Stats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatsReply, error) {
    64  	out := new(StatsReply)
    65  	err := c.cc.Invoke(ctx, Downloader_Stats_FullMethodName, in, out, opts...)
    66  	if err != nil {
    67  		return nil, err
    68  	}
    69  	return out, nil
    70  }
    71  
    72  // DownloaderServer is the server API for Downloader service.
    73  // All implementations must embed UnimplementedDownloaderServer
    74  // for forward compatibility
    75  type DownloaderServer interface {
    76  	Download(context.Context, *DownloadRequest) (*emptypb.Empty, error)
    77  	Verify(context.Context, *VerifyRequest) (*emptypb.Empty, error)
    78  	Stats(context.Context, *StatsRequest) (*StatsReply, error)
    79  	mustEmbedUnimplementedDownloaderServer()
    80  }
    81  
    82  // UnimplementedDownloaderServer must be embedded to have forward compatible implementations.
    83  type UnimplementedDownloaderServer struct {
    84  }
    85  
    86  func (UnimplementedDownloaderServer) Download(context.Context, *DownloadRequest) (*emptypb.Empty, error) {
    87  	return nil, status.Errorf(codes.Unimplemented, "method Download not implemented")
    88  }
    89  func (UnimplementedDownloaderServer) Verify(context.Context, *VerifyRequest) (*emptypb.Empty, error) {
    90  	return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented")
    91  }
    92  func (UnimplementedDownloaderServer) Stats(context.Context, *StatsRequest) (*StatsReply, error) {
    93  	return nil, status.Errorf(codes.Unimplemented, "method Stats not implemented")
    94  }
    95  func (UnimplementedDownloaderServer) mustEmbedUnimplementedDownloaderServer() {}
    96  
    97  // UnsafeDownloaderServer may be embedded to opt out of forward compatibility for this service.
    98  // Use of this interface is not recommended, as added methods to DownloaderServer will
    99  // result in compilation errors.
   100  type UnsafeDownloaderServer interface {
   101  	mustEmbedUnimplementedDownloaderServer()
   102  }
   103  
   104  func RegisterDownloaderServer(s grpc.ServiceRegistrar, srv DownloaderServer) {
   105  	s.RegisterService(&Downloader_ServiceDesc, srv)
   106  }
   107  
   108  func _Downloader_Download_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   109  	in := new(DownloadRequest)
   110  	if err := dec(in); err != nil {
   111  		return nil, err
   112  	}
   113  	if interceptor == nil {
   114  		return srv.(DownloaderServer).Download(ctx, in)
   115  	}
   116  	info := &grpc.UnaryServerInfo{
   117  		Server:     srv,
   118  		FullMethod: Downloader_Download_FullMethodName,
   119  	}
   120  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   121  		return srv.(DownloaderServer).Download(ctx, req.(*DownloadRequest))
   122  	}
   123  	return interceptor(ctx, in, info, handler)
   124  }
   125  
   126  func _Downloader_Verify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   127  	in := new(VerifyRequest)
   128  	if err := dec(in); err != nil {
   129  		return nil, err
   130  	}
   131  	if interceptor == nil {
   132  		return srv.(DownloaderServer).Verify(ctx, in)
   133  	}
   134  	info := &grpc.UnaryServerInfo{
   135  		Server:     srv,
   136  		FullMethod: Downloader_Verify_FullMethodName,
   137  	}
   138  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   139  		return srv.(DownloaderServer).Verify(ctx, req.(*VerifyRequest))
   140  	}
   141  	return interceptor(ctx, in, info, handler)
   142  }
   143  
   144  func _Downloader_Stats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   145  	in := new(StatsRequest)
   146  	if err := dec(in); err != nil {
   147  		return nil, err
   148  	}
   149  	if interceptor == nil {
   150  		return srv.(DownloaderServer).Stats(ctx, in)
   151  	}
   152  	info := &grpc.UnaryServerInfo{
   153  		Server:     srv,
   154  		FullMethod: Downloader_Stats_FullMethodName,
   155  	}
   156  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   157  		return srv.(DownloaderServer).Stats(ctx, req.(*StatsRequest))
   158  	}
   159  	return interceptor(ctx, in, info, handler)
   160  }
   161  
   162  // Downloader_ServiceDesc is the grpc.ServiceDesc for Downloader service.
   163  // It's only intended for direct use with grpc.RegisterService,
   164  // and not to be introspected or modified (even as a copy)
   165  var Downloader_ServiceDesc = grpc.ServiceDesc{
   166  	ServiceName: "downloader.Downloader",
   167  	HandlerType: (*DownloaderServer)(nil),
   168  	Methods: []grpc.MethodDesc{
   169  		{
   170  			MethodName: "Download",
   171  			Handler:    _Downloader_Download_Handler,
   172  		},
   173  		{
   174  			MethodName: "Verify",
   175  			Handler:    _Downloader_Verify_Handler,
   176  		},
   177  		{
   178  			MethodName: "Stats",
   179  			Handler:    _Downloader_Stats_Handler,
   180  		},
   181  	},
   182  	Streams:  []grpc.StreamDesc{},
   183  	Metadata: "downloader/downloader.proto",
   184  }