github.com/letsencrypt/boulder@v0.20251208.0/email/proto/exporter_grpc.pb.go (about)

     1  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
     2  // versions:
     3  // - protoc-gen-go-grpc v1.5.1
     4  // - protoc             v3.20.1
     5  // source: exporter.proto
     6  
     7  package proto
     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.64.0 or later.
    20  const _ = grpc.SupportPackageIsVersion9
    21  
    22  const (
    23  	Exporter_SendContacts_FullMethodName = "/email.Exporter/SendContacts"
    24  	Exporter_SendCase_FullMethodName     = "/email.Exporter/SendCase"
    25  )
    26  
    27  // ExporterClient is the client API for Exporter service.
    28  //
    29  // 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.
    30  type ExporterClient interface {
    31  	SendContacts(ctx context.Context, in *SendContactsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
    32  	SendCase(ctx context.Context, in *SendCaseRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
    33  }
    34  
    35  type exporterClient struct {
    36  	cc grpc.ClientConnInterface
    37  }
    38  
    39  func NewExporterClient(cc grpc.ClientConnInterface) ExporterClient {
    40  	return &exporterClient{cc}
    41  }
    42  
    43  func (c *exporterClient) SendContacts(ctx context.Context, in *SendContactsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
    44  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
    45  	out := new(emptypb.Empty)
    46  	err := c.cc.Invoke(ctx, Exporter_SendContacts_FullMethodName, in, out, cOpts...)
    47  	if err != nil {
    48  		return nil, err
    49  	}
    50  	return out, nil
    51  }
    52  
    53  func (c *exporterClient) SendCase(ctx context.Context, in *SendCaseRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
    54  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
    55  	out := new(emptypb.Empty)
    56  	err := c.cc.Invoke(ctx, Exporter_SendCase_FullMethodName, in, out, cOpts...)
    57  	if err != nil {
    58  		return nil, err
    59  	}
    60  	return out, nil
    61  }
    62  
    63  // ExporterServer is the server API for Exporter service.
    64  // All implementations must embed UnimplementedExporterServer
    65  // for forward compatibility.
    66  type ExporterServer interface {
    67  	SendContacts(context.Context, *SendContactsRequest) (*emptypb.Empty, error)
    68  	SendCase(context.Context, *SendCaseRequest) (*emptypb.Empty, error)
    69  	mustEmbedUnimplementedExporterServer()
    70  }
    71  
    72  // UnimplementedExporterServer must be embedded to have
    73  // forward compatible implementations.
    74  //
    75  // NOTE: this should be embedded by value instead of pointer to avoid a nil
    76  // pointer dereference when methods are called.
    77  type UnimplementedExporterServer struct{}
    78  
    79  func (UnimplementedExporterServer) SendContacts(context.Context, *SendContactsRequest) (*emptypb.Empty, error) {
    80  	return nil, status.Errorf(codes.Unimplemented, "method SendContacts not implemented")
    81  }
    82  func (UnimplementedExporterServer) SendCase(context.Context, *SendCaseRequest) (*emptypb.Empty, error) {
    83  	return nil, status.Errorf(codes.Unimplemented, "method SendCase not implemented")
    84  }
    85  func (UnimplementedExporterServer) mustEmbedUnimplementedExporterServer() {}
    86  func (UnimplementedExporterServer) testEmbeddedByValue()                  {}
    87  
    88  // UnsafeExporterServer may be embedded to opt out of forward compatibility for this service.
    89  // Use of this interface is not recommended, as added methods to ExporterServer will
    90  // result in compilation errors.
    91  type UnsafeExporterServer interface {
    92  	mustEmbedUnimplementedExporterServer()
    93  }
    94  
    95  func RegisterExporterServer(s grpc.ServiceRegistrar, srv ExporterServer) {
    96  	// If the following call pancis, it indicates UnimplementedExporterServer was
    97  	// embedded by pointer and is nil.  This will cause panics if an
    98  	// unimplemented method is ever invoked, so we test this at initialization
    99  	// time to prevent it from happening at runtime later due to I/O.
   100  	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
   101  		t.testEmbeddedByValue()
   102  	}
   103  	s.RegisterService(&Exporter_ServiceDesc, srv)
   104  }
   105  
   106  func _Exporter_SendContacts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   107  	in := new(SendContactsRequest)
   108  	if err := dec(in); err != nil {
   109  		return nil, err
   110  	}
   111  	if interceptor == nil {
   112  		return srv.(ExporterServer).SendContacts(ctx, in)
   113  	}
   114  	info := &grpc.UnaryServerInfo{
   115  		Server:     srv,
   116  		FullMethod: Exporter_SendContacts_FullMethodName,
   117  	}
   118  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   119  		return srv.(ExporterServer).SendContacts(ctx, req.(*SendContactsRequest))
   120  	}
   121  	return interceptor(ctx, in, info, handler)
   122  }
   123  
   124  func _Exporter_SendCase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   125  	in := new(SendCaseRequest)
   126  	if err := dec(in); err != nil {
   127  		return nil, err
   128  	}
   129  	if interceptor == nil {
   130  		return srv.(ExporterServer).SendCase(ctx, in)
   131  	}
   132  	info := &grpc.UnaryServerInfo{
   133  		Server:     srv,
   134  		FullMethod: Exporter_SendCase_FullMethodName,
   135  	}
   136  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   137  		return srv.(ExporterServer).SendCase(ctx, req.(*SendCaseRequest))
   138  	}
   139  	return interceptor(ctx, in, info, handler)
   140  }
   141  
   142  // Exporter_ServiceDesc is the grpc.ServiceDesc for Exporter service.
   143  // It's only intended for direct use with grpc.RegisterService,
   144  // and not to be introspected or modified (even as a copy)
   145  var Exporter_ServiceDesc = grpc.ServiceDesc{
   146  	ServiceName: "email.Exporter",
   147  	HandlerType: (*ExporterServer)(nil),
   148  	Methods: []grpc.MethodDesc{
   149  		{
   150  			MethodName: "SendContacts",
   151  			Handler:    _Exporter_SendContacts_Handler,
   152  		},
   153  		{
   154  			MethodName: "SendCase",
   155  			Handler:    _Exporter_SendCase_Handler,
   156  		},
   157  	},
   158  	Streams:  []grpc.StreamDesc{},
   159  	Metadata: "exporter.proto",
   160  }