github.com/letsencrypt/boulder@v0.20251208.0/crl/storer/proto/storer_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: storer.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  	CRLStorer_UploadCRL_FullMethodName = "/storer.CRLStorer/UploadCRL"
    24  )
    25  
    26  // CRLStorerClient is the client API for CRLStorer service.
    27  //
    28  // 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.
    29  type CRLStorerClient interface {
    30  	UploadCRL(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[UploadCRLRequest, emptypb.Empty], error)
    31  }
    32  
    33  type cRLStorerClient struct {
    34  	cc grpc.ClientConnInterface
    35  }
    36  
    37  func NewCRLStorerClient(cc grpc.ClientConnInterface) CRLStorerClient {
    38  	return &cRLStorerClient{cc}
    39  }
    40  
    41  func (c *cRLStorerClient) UploadCRL(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[UploadCRLRequest, emptypb.Empty], error) {
    42  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
    43  	stream, err := c.cc.NewStream(ctx, &CRLStorer_ServiceDesc.Streams[0], CRLStorer_UploadCRL_FullMethodName, cOpts...)
    44  	if err != nil {
    45  		return nil, err
    46  	}
    47  	x := &grpc.GenericClientStream[UploadCRLRequest, emptypb.Empty]{ClientStream: stream}
    48  	return x, nil
    49  }
    50  
    51  // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
    52  type CRLStorer_UploadCRLClient = grpc.ClientStreamingClient[UploadCRLRequest, emptypb.Empty]
    53  
    54  // CRLStorerServer is the server API for CRLStorer service.
    55  // All implementations must embed UnimplementedCRLStorerServer
    56  // for forward compatibility.
    57  type CRLStorerServer interface {
    58  	UploadCRL(grpc.ClientStreamingServer[UploadCRLRequest, emptypb.Empty]) error
    59  	mustEmbedUnimplementedCRLStorerServer()
    60  }
    61  
    62  // UnimplementedCRLStorerServer must be embedded to have
    63  // forward compatible implementations.
    64  //
    65  // NOTE: this should be embedded by value instead of pointer to avoid a nil
    66  // pointer dereference when methods are called.
    67  type UnimplementedCRLStorerServer struct{}
    68  
    69  func (UnimplementedCRLStorerServer) UploadCRL(grpc.ClientStreamingServer[UploadCRLRequest, emptypb.Empty]) error {
    70  	return status.Errorf(codes.Unimplemented, "method UploadCRL not implemented")
    71  }
    72  func (UnimplementedCRLStorerServer) mustEmbedUnimplementedCRLStorerServer() {}
    73  func (UnimplementedCRLStorerServer) testEmbeddedByValue()                   {}
    74  
    75  // UnsafeCRLStorerServer may be embedded to opt out of forward compatibility for this service.
    76  // Use of this interface is not recommended, as added methods to CRLStorerServer will
    77  // result in compilation errors.
    78  type UnsafeCRLStorerServer interface {
    79  	mustEmbedUnimplementedCRLStorerServer()
    80  }
    81  
    82  func RegisterCRLStorerServer(s grpc.ServiceRegistrar, srv CRLStorerServer) {
    83  	// If the following call pancis, it indicates UnimplementedCRLStorerServer was
    84  	// embedded by pointer and is nil.  This will cause panics if an
    85  	// unimplemented method is ever invoked, so we test this at initialization
    86  	// time to prevent it from happening at runtime later due to I/O.
    87  	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
    88  		t.testEmbeddedByValue()
    89  	}
    90  	s.RegisterService(&CRLStorer_ServiceDesc, srv)
    91  }
    92  
    93  func _CRLStorer_UploadCRL_Handler(srv interface{}, stream grpc.ServerStream) error {
    94  	return srv.(CRLStorerServer).UploadCRL(&grpc.GenericServerStream[UploadCRLRequest, emptypb.Empty]{ServerStream: stream})
    95  }
    96  
    97  // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
    98  type CRLStorer_UploadCRLServer = grpc.ClientStreamingServer[UploadCRLRequest, emptypb.Empty]
    99  
   100  // CRLStorer_ServiceDesc is the grpc.ServiceDesc for CRLStorer service.
   101  // It's only intended for direct use with grpc.RegisterService,
   102  // and not to be introspected or modified (even as a copy)
   103  var CRLStorer_ServiceDesc = grpc.ServiceDesc{
   104  	ServiceName: "storer.CRLStorer",
   105  	HandlerType: (*CRLStorerServer)(nil),
   106  	Methods:     []grpc.MethodDesc{},
   107  	Streams: []grpc.StreamDesc{
   108  		{
   109  			StreamName:    "UploadCRL",
   110  			Handler:       _CRLStorer_UploadCRL_Handler,
   111  			ClientStreams: true,
   112  		},
   113  	},
   114  	Metadata: "storer.proto",
   115  }