github.com/letsencrypt/boulder@v0.20251208.0/ca/proto/ca_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: ca.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  )
    15  
    16  // This is a compile-time assertion to ensure that this generated file
    17  // is compatible with the grpc package it is being compiled against.
    18  // Requires gRPC-Go v1.64.0 or later.
    19  const _ = grpc.SupportPackageIsVersion9
    20  
    21  const (
    22  	CertificateAuthority_IssueCertificate_FullMethodName = "/ca.CertificateAuthority/IssueCertificate"
    23  )
    24  
    25  // CertificateAuthorityClient is the client API for CertificateAuthority service.
    26  //
    27  // 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.
    28  //
    29  // CertificateAuthority issues certificates.
    30  type CertificateAuthorityClient interface {
    31  	// IssueCertificate issues a precertificate, gets SCTs, issues a certificate, and returns that.
    32  	IssueCertificate(ctx context.Context, in *IssueCertificateRequest, opts ...grpc.CallOption) (*IssueCertificateResponse, error)
    33  }
    34  
    35  type certificateAuthorityClient struct {
    36  	cc grpc.ClientConnInterface
    37  }
    38  
    39  func NewCertificateAuthorityClient(cc grpc.ClientConnInterface) CertificateAuthorityClient {
    40  	return &certificateAuthorityClient{cc}
    41  }
    42  
    43  func (c *certificateAuthorityClient) IssueCertificate(ctx context.Context, in *IssueCertificateRequest, opts ...grpc.CallOption) (*IssueCertificateResponse, error) {
    44  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
    45  	out := new(IssueCertificateResponse)
    46  	err := c.cc.Invoke(ctx, CertificateAuthority_IssueCertificate_FullMethodName, in, out, cOpts...)
    47  	if err != nil {
    48  		return nil, err
    49  	}
    50  	return out, nil
    51  }
    52  
    53  // CertificateAuthorityServer is the server API for CertificateAuthority service.
    54  // All implementations must embed UnimplementedCertificateAuthorityServer
    55  // for forward compatibility.
    56  //
    57  // CertificateAuthority issues certificates.
    58  type CertificateAuthorityServer interface {
    59  	// IssueCertificate issues a precertificate, gets SCTs, issues a certificate, and returns that.
    60  	IssueCertificate(context.Context, *IssueCertificateRequest) (*IssueCertificateResponse, error)
    61  	mustEmbedUnimplementedCertificateAuthorityServer()
    62  }
    63  
    64  // UnimplementedCertificateAuthorityServer must be embedded to have
    65  // forward compatible implementations.
    66  //
    67  // NOTE: this should be embedded by value instead of pointer to avoid a nil
    68  // pointer dereference when methods are called.
    69  type UnimplementedCertificateAuthorityServer struct{}
    70  
    71  func (UnimplementedCertificateAuthorityServer) IssueCertificate(context.Context, *IssueCertificateRequest) (*IssueCertificateResponse, error) {
    72  	return nil, status.Errorf(codes.Unimplemented, "method IssueCertificate not implemented")
    73  }
    74  func (UnimplementedCertificateAuthorityServer) mustEmbedUnimplementedCertificateAuthorityServer() {}
    75  func (UnimplementedCertificateAuthorityServer) testEmbeddedByValue()                              {}
    76  
    77  // UnsafeCertificateAuthorityServer may be embedded to opt out of forward compatibility for this service.
    78  // Use of this interface is not recommended, as added methods to CertificateAuthorityServer will
    79  // result in compilation errors.
    80  type UnsafeCertificateAuthorityServer interface {
    81  	mustEmbedUnimplementedCertificateAuthorityServer()
    82  }
    83  
    84  func RegisterCertificateAuthorityServer(s grpc.ServiceRegistrar, srv CertificateAuthorityServer) {
    85  	// If the following call pancis, it indicates UnimplementedCertificateAuthorityServer was
    86  	// embedded by pointer and is nil.  This will cause panics if an
    87  	// unimplemented method is ever invoked, so we test this at initialization
    88  	// time to prevent it from happening at runtime later due to I/O.
    89  	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
    90  		t.testEmbeddedByValue()
    91  	}
    92  	s.RegisterService(&CertificateAuthority_ServiceDesc, srv)
    93  }
    94  
    95  func _CertificateAuthority_IssueCertificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    96  	in := new(IssueCertificateRequest)
    97  	if err := dec(in); err != nil {
    98  		return nil, err
    99  	}
   100  	if interceptor == nil {
   101  		return srv.(CertificateAuthorityServer).IssueCertificate(ctx, in)
   102  	}
   103  	info := &grpc.UnaryServerInfo{
   104  		Server:     srv,
   105  		FullMethod: CertificateAuthority_IssueCertificate_FullMethodName,
   106  	}
   107  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   108  		return srv.(CertificateAuthorityServer).IssueCertificate(ctx, req.(*IssueCertificateRequest))
   109  	}
   110  	return interceptor(ctx, in, info, handler)
   111  }
   112  
   113  // CertificateAuthority_ServiceDesc is the grpc.ServiceDesc for CertificateAuthority service.
   114  // It's only intended for direct use with grpc.RegisterService,
   115  // and not to be introspected or modified (even as a copy)
   116  var CertificateAuthority_ServiceDesc = grpc.ServiceDesc{
   117  	ServiceName: "ca.CertificateAuthority",
   118  	HandlerType: (*CertificateAuthorityServer)(nil),
   119  	Methods: []grpc.MethodDesc{
   120  		{
   121  			MethodName: "IssueCertificate",
   122  			Handler:    _CertificateAuthority_IssueCertificate_Handler,
   123  		},
   124  	},
   125  	Streams:  []grpc.StreamDesc{},
   126  	Metadata: "ca.proto",
   127  }
   128  
   129  const (
   130  	CRLGenerator_GenerateCRL_FullMethodName = "/ca.CRLGenerator/GenerateCRL"
   131  )
   132  
   133  // CRLGeneratorClient is the client API for CRLGenerator service.
   134  //
   135  // 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.
   136  //
   137  // CRLGenerator signs CRLs. It is separated for the same reason as OCSPGenerator.
   138  type CRLGeneratorClient interface {
   139  	GenerateCRL(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[GenerateCRLRequest, GenerateCRLResponse], error)
   140  }
   141  
   142  type cRLGeneratorClient struct {
   143  	cc grpc.ClientConnInterface
   144  }
   145  
   146  func NewCRLGeneratorClient(cc grpc.ClientConnInterface) CRLGeneratorClient {
   147  	return &cRLGeneratorClient{cc}
   148  }
   149  
   150  func (c *cRLGeneratorClient) GenerateCRL(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[GenerateCRLRequest, GenerateCRLResponse], error) {
   151  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   152  	stream, err := c.cc.NewStream(ctx, &CRLGenerator_ServiceDesc.Streams[0], CRLGenerator_GenerateCRL_FullMethodName, cOpts...)
   153  	if err != nil {
   154  		return nil, err
   155  	}
   156  	x := &grpc.GenericClientStream[GenerateCRLRequest, GenerateCRLResponse]{ClientStream: stream}
   157  	return x, nil
   158  }
   159  
   160  // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
   161  type CRLGenerator_GenerateCRLClient = grpc.BidiStreamingClient[GenerateCRLRequest, GenerateCRLResponse]
   162  
   163  // CRLGeneratorServer is the server API for CRLGenerator service.
   164  // All implementations must embed UnimplementedCRLGeneratorServer
   165  // for forward compatibility.
   166  //
   167  // CRLGenerator signs CRLs. It is separated for the same reason as OCSPGenerator.
   168  type CRLGeneratorServer interface {
   169  	GenerateCRL(grpc.BidiStreamingServer[GenerateCRLRequest, GenerateCRLResponse]) error
   170  	mustEmbedUnimplementedCRLGeneratorServer()
   171  }
   172  
   173  // UnimplementedCRLGeneratorServer must be embedded to have
   174  // forward compatible implementations.
   175  //
   176  // NOTE: this should be embedded by value instead of pointer to avoid a nil
   177  // pointer dereference when methods are called.
   178  type UnimplementedCRLGeneratorServer struct{}
   179  
   180  func (UnimplementedCRLGeneratorServer) GenerateCRL(grpc.BidiStreamingServer[GenerateCRLRequest, GenerateCRLResponse]) error {
   181  	return status.Errorf(codes.Unimplemented, "method GenerateCRL not implemented")
   182  }
   183  func (UnimplementedCRLGeneratorServer) mustEmbedUnimplementedCRLGeneratorServer() {}
   184  func (UnimplementedCRLGeneratorServer) testEmbeddedByValue()                      {}
   185  
   186  // UnsafeCRLGeneratorServer may be embedded to opt out of forward compatibility for this service.
   187  // Use of this interface is not recommended, as added methods to CRLGeneratorServer will
   188  // result in compilation errors.
   189  type UnsafeCRLGeneratorServer interface {
   190  	mustEmbedUnimplementedCRLGeneratorServer()
   191  }
   192  
   193  func RegisterCRLGeneratorServer(s grpc.ServiceRegistrar, srv CRLGeneratorServer) {
   194  	// If the following call pancis, it indicates UnimplementedCRLGeneratorServer was
   195  	// embedded by pointer and is nil.  This will cause panics if an
   196  	// unimplemented method is ever invoked, so we test this at initialization
   197  	// time to prevent it from happening at runtime later due to I/O.
   198  	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
   199  		t.testEmbeddedByValue()
   200  	}
   201  	s.RegisterService(&CRLGenerator_ServiceDesc, srv)
   202  }
   203  
   204  func _CRLGenerator_GenerateCRL_Handler(srv interface{}, stream grpc.ServerStream) error {
   205  	return srv.(CRLGeneratorServer).GenerateCRL(&grpc.GenericServerStream[GenerateCRLRequest, GenerateCRLResponse]{ServerStream: stream})
   206  }
   207  
   208  // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
   209  type CRLGenerator_GenerateCRLServer = grpc.BidiStreamingServer[GenerateCRLRequest, GenerateCRLResponse]
   210  
   211  // CRLGenerator_ServiceDesc is the grpc.ServiceDesc for CRLGenerator service.
   212  // It's only intended for direct use with grpc.RegisterService,
   213  // and not to be introspected or modified (even as a copy)
   214  var CRLGenerator_ServiceDesc = grpc.ServiceDesc{
   215  	ServiceName: "ca.CRLGenerator",
   216  	HandlerType: (*CRLGeneratorServer)(nil),
   217  	Methods:     []grpc.MethodDesc{},
   218  	Streams: []grpc.StreamDesc{
   219  		{
   220  			StreamName:    "GenerateCRL",
   221  			Handler:       _CRLGenerator_GenerateCRL_Handler,
   222  			ServerStreams: true,
   223  			ClientStreams: true,
   224  		},
   225  	},
   226  	Metadata: "ca.proto",
   227  }