// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc v3.20.1 // source: ca.proto package proto import ( context "context" 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 ( CertificateAuthority_IssueCertificate_FullMethodName = "/ca.CertificateAuthority/IssueCertificate" ) // CertificateAuthorityClient is the client API for CertificateAuthority 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. // // CertificateAuthority issues certificates. type CertificateAuthorityClient interface { // IssueCertificate issues a precertificate, gets SCTs, issues a certificate, and returns that. IssueCertificate(ctx context.Context, in *IssueCertificateRequest, opts ...grpc.CallOption) (*IssueCertificateResponse, error) } type certificateAuthorityClient struct { cc grpc.ClientConnInterface } func NewCertificateAuthorityClient(cc grpc.ClientConnInterface) CertificateAuthorityClient { return &certificateAuthorityClient{cc} } func (c *certificateAuthorityClient) IssueCertificate(ctx context.Context, in *IssueCertificateRequest, opts ...grpc.CallOption) (*IssueCertificateResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(IssueCertificateResponse) err := c.cc.Invoke(ctx, CertificateAuthority_IssueCertificate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // CertificateAuthorityServer is the server API for CertificateAuthority service. // All implementations must embed UnimplementedCertificateAuthorityServer // for forward compatibility. // // CertificateAuthority issues certificates. type CertificateAuthorityServer interface { // IssueCertificate issues a precertificate, gets SCTs, issues a certificate, and returns that. IssueCertificate(context.Context, *IssueCertificateRequest) (*IssueCertificateResponse, error) mustEmbedUnimplementedCertificateAuthorityServer() } // UnimplementedCertificateAuthorityServer 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 UnimplementedCertificateAuthorityServer struct{} func (UnimplementedCertificateAuthorityServer) IssueCertificate(context.Context, *IssueCertificateRequest) (*IssueCertificateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method IssueCertificate not implemented") } func (UnimplementedCertificateAuthorityServer) mustEmbedUnimplementedCertificateAuthorityServer() {} func (UnimplementedCertificateAuthorityServer) testEmbeddedByValue() {} // UnsafeCertificateAuthorityServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to CertificateAuthorityServer will // result in compilation errors. type UnsafeCertificateAuthorityServer interface { mustEmbedUnimplementedCertificateAuthorityServer() } func RegisterCertificateAuthorityServer(s grpc.ServiceRegistrar, srv CertificateAuthorityServer) { // If the following call pancis, it indicates UnimplementedCertificateAuthorityServer 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(&CertificateAuthority_ServiceDesc, srv) } func _CertificateAuthority_IssueCertificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(IssueCertificateRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CertificateAuthorityServer).IssueCertificate(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: CertificateAuthority_IssueCertificate_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CertificateAuthorityServer).IssueCertificate(ctx, req.(*IssueCertificateRequest)) } return interceptor(ctx, in, info, handler) } // CertificateAuthority_ServiceDesc is the grpc.ServiceDesc for CertificateAuthority service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var CertificateAuthority_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ca.CertificateAuthority", HandlerType: (*CertificateAuthorityServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "IssueCertificate", Handler: _CertificateAuthority_IssueCertificate_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "ca.proto", } const ( OCSPGenerator_GenerateOCSP_FullMethodName = "/ca.OCSPGenerator/GenerateOCSP" ) // OCSPGeneratorClient is the client API for OCSPGenerator 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. // // OCSPGenerator generates OCSP. We separate this out from // CertificateAuthority so that we can restrict access to a different subset of // hosts, so the hosts that need to request OCSP generation don't need to be // able to request certificate issuance. type OCSPGeneratorClient interface { GenerateOCSP(ctx context.Context, in *GenerateOCSPRequest, opts ...grpc.CallOption) (*OCSPResponse, error) } type oCSPGeneratorClient struct { cc grpc.ClientConnInterface } func NewOCSPGeneratorClient(cc grpc.ClientConnInterface) OCSPGeneratorClient { return &oCSPGeneratorClient{cc} } func (c *oCSPGeneratorClient) GenerateOCSP(ctx context.Context, in *GenerateOCSPRequest, opts ...grpc.CallOption) (*OCSPResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(OCSPResponse) err := c.cc.Invoke(ctx, OCSPGenerator_GenerateOCSP_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // OCSPGeneratorServer is the server API for OCSPGenerator service. // All implementations must embed UnimplementedOCSPGeneratorServer // for forward compatibility. // // OCSPGenerator generates OCSP. We separate this out from // CertificateAuthority so that we can restrict access to a different subset of // hosts, so the hosts that need to request OCSP generation don't need to be // able to request certificate issuance. type OCSPGeneratorServer interface { GenerateOCSP(context.Context, *GenerateOCSPRequest) (*OCSPResponse, error) mustEmbedUnimplementedOCSPGeneratorServer() } // UnimplementedOCSPGeneratorServer 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 UnimplementedOCSPGeneratorServer struct{} func (UnimplementedOCSPGeneratorServer) GenerateOCSP(context.Context, *GenerateOCSPRequest) (*OCSPResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GenerateOCSP not implemented") } func (UnimplementedOCSPGeneratorServer) mustEmbedUnimplementedOCSPGeneratorServer() {} func (UnimplementedOCSPGeneratorServer) testEmbeddedByValue() {} // UnsafeOCSPGeneratorServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to OCSPGeneratorServer will // result in compilation errors. type UnsafeOCSPGeneratorServer interface { mustEmbedUnimplementedOCSPGeneratorServer() } func RegisterOCSPGeneratorServer(s grpc.ServiceRegistrar, srv OCSPGeneratorServer) { // If the following call pancis, it indicates UnimplementedOCSPGeneratorServer 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(&OCSPGenerator_ServiceDesc, srv) } func _OCSPGenerator_GenerateOCSP_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GenerateOCSPRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(OCSPGeneratorServer).GenerateOCSP(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: OCSPGenerator_GenerateOCSP_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OCSPGeneratorServer).GenerateOCSP(ctx, req.(*GenerateOCSPRequest)) } return interceptor(ctx, in, info, handler) } // OCSPGenerator_ServiceDesc is the grpc.ServiceDesc for OCSPGenerator service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var OCSPGenerator_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ca.OCSPGenerator", HandlerType: (*OCSPGeneratorServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GenerateOCSP", Handler: _OCSPGenerator_GenerateOCSP_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "ca.proto", } const ( CRLGenerator_GenerateCRL_FullMethodName = "/ca.CRLGenerator/GenerateCRL" ) // CRLGeneratorClient is the client API for CRLGenerator 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. // // CRLGenerator signs CRLs. It is separated for the same reason as OCSPGenerator. type CRLGeneratorClient interface { GenerateCRL(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[GenerateCRLRequest, GenerateCRLResponse], error) } type cRLGeneratorClient struct { cc grpc.ClientConnInterface } func NewCRLGeneratorClient(cc grpc.ClientConnInterface) CRLGeneratorClient { return &cRLGeneratorClient{cc} } func (c *cRLGeneratorClient) GenerateCRL(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[GenerateCRLRequest, GenerateCRLResponse], error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) stream, err := c.cc.NewStream(ctx, &CRLGenerator_ServiceDesc.Streams[0], CRLGenerator_GenerateCRL_FullMethodName, cOpts...) if err != nil { return nil, err } x := &grpc.GenericClientStream[GenerateCRLRequest, GenerateCRLResponse]{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 CRLGenerator_GenerateCRLClient = grpc.BidiStreamingClient[GenerateCRLRequest, GenerateCRLResponse] // CRLGeneratorServer is the server API for CRLGenerator service. // All implementations must embed UnimplementedCRLGeneratorServer // for forward compatibility. // // CRLGenerator signs CRLs. It is separated for the same reason as OCSPGenerator. type CRLGeneratorServer interface { GenerateCRL(grpc.BidiStreamingServer[GenerateCRLRequest, GenerateCRLResponse]) error mustEmbedUnimplementedCRLGeneratorServer() } // UnimplementedCRLGeneratorServer 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 UnimplementedCRLGeneratorServer struct{} func (UnimplementedCRLGeneratorServer) GenerateCRL(grpc.BidiStreamingServer[GenerateCRLRequest, GenerateCRLResponse]) error { return status.Errorf(codes.Unimplemented, "method GenerateCRL not implemented") } func (UnimplementedCRLGeneratorServer) mustEmbedUnimplementedCRLGeneratorServer() {} func (UnimplementedCRLGeneratorServer) testEmbeddedByValue() {} // UnsafeCRLGeneratorServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to CRLGeneratorServer will // result in compilation errors. type UnsafeCRLGeneratorServer interface { mustEmbedUnimplementedCRLGeneratorServer() } func RegisterCRLGeneratorServer(s grpc.ServiceRegistrar, srv CRLGeneratorServer) { // If the following call pancis, it indicates UnimplementedCRLGeneratorServer 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(&CRLGenerator_ServiceDesc, srv) } func _CRLGenerator_GenerateCRL_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(CRLGeneratorServer).GenerateCRL(&grpc.GenericServerStream[GenerateCRLRequest, GenerateCRLResponse]{ServerStream: stream}) } // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type CRLGenerator_GenerateCRLServer = grpc.BidiStreamingServer[GenerateCRLRequest, GenerateCRLResponse] // CRLGenerator_ServiceDesc is the grpc.ServiceDesc for CRLGenerator service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var CRLGenerator_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ca.CRLGenerator", HandlerType: (*CRLGeneratorServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "GenerateCRL", Handler: _CRLGenerator_GenerateCRL_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "ca.proto", }