Raw descriptor bytes in .pb.go files were corrupted by the sed-based module path rename (string length changed, breaking protobuf binary encoding). Regenerated with protoc to fix. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
668 lines
27 KiB
Go
668 lines
27 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.6.1
|
|
// - protoc v6.32.1
|
|
// source: proto/metacrypt/v2/ca.proto
|
|
|
|
package metacryptv2
|
|
|
|
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 (
|
|
CAService_ImportRoot_FullMethodName = "/metacrypt.v2.CAService/ImportRoot"
|
|
CAService_GetRoot_FullMethodName = "/metacrypt.v2.CAService/GetRoot"
|
|
CAService_CreateIssuer_FullMethodName = "/metacrypt.v2.CAService/CreateIssuer"
|
|
CAService_DeleteIssuer_FullMethodName = "/metacrypt.v2.CAService/DeleteIssuer"
|
|
CAService_ListIssuers_FullMethodName = "/metacrypt.v2.CAService/ListIssuers"
|
|
CAService_GetIssuer_FullMethodName = "/metacrypt.v2.CAService/GetIssuer"
|
|
CAService_GetChain_FullMethodName = "/metacrypt.v2.CAService/GetChain"
|
|
CAService_IssueCert_FullMethodName = "/metacrypt.v2.CAService/IssueCert"
|
|
CAService_GetCert_FullMethodName = "/metacrypt.v2.CAService/GetCert"
|
|
CAService_ListCerts_FullMethodName = "/metacrypt.v2.CAService/ListCerts"
|
|
CAService_RenewCert_FullMethodName = "/metacrypt.v2.CAService/RenewCert"
|
|
CAService_SignCSR_FullMethodName = "/metacrypt.v2.CAService/SignCSR"
|
|
CAService_RevokeCert_FullMethodName = "/metacrypt.v2.CAService/RevokeCert"
|
|
CAService_DeleteCert_FullMethodName = "/metacrypt.v2.CAService/DeleteCert"
|
|
)
|
|
|
|
// CAServiceClient is the client API for CAService 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.
|
|
//
|
|
// CAService provides typed, authenticated access to CA engine operations.
|
|
// All RPCs require the service to be unsealed. Write operations (CreateIssuer,
|
|
// DeleteIssuer, ImportRoot, IssueCert, RenewCert) require authentication.
|
|
// Admin-only operations (CreateIssuer, DeleteIssuer, ImportRoot, RevokeCert,
|
|
// DeleteCert) additionally require the caller to have admin privileges.
|
|
type CAServiceClient interface {
|
|
// ImportRoot imports an existing root CA certificate and private key.
|
|
// Admin only. Only allowed when no valid root exists.
|
|
ImportRoot(ctx context.Context, in *ImportRootRequest, opts ...grpc.CallOption) (*ImportRootResponse, error)
|
|
// GetRoot returns the root CA certificate for a mount.
|
|
GetRoot(ctx context.Context, in *GetRootRequest, opts ...grpc.CallOption) (*GetRootResponse, error)
|
|
// CreateIssuer creates a new intermediate CA issuer signed by the root.
|
|
// Admin only.
|
|
CreateIssuer(ctx context.Context, in *CreateIssuerRequest, opts ...grpc.CallOption) (*CreateIssuerResponse, error)
|
|
// DeleteIssuer removes an issuer and its key material. Admin only.
|
|
DeleteIssuer(ctx context.Context, in *DeleteIssuerRequest, opts ...grpc.CallOption) (*DeleteIssuerResponse, error)
|
|
// ListIssuers returns the names of all configured issuers. Auth required.
|
|
ListIssuers(ctx context.Context, in *ListIssuersRequest, opts ...grpc.CallOption) (*ListIssuersResponse, error)
|
|
// GetIssuer returns the PEM-encoded certificate for a named issuer.
|
|
GetIssuer(ctx context.Context, in *GetIssuerRequest, opts ...grpc.CallOption) (*GetIssuerResponse, error)
|
|
// GetChain returns the full PEM certificate chain for a named issuer.
|
|
GetChain(ctx context.Context, in *CAServiceGetChainRequest, opts ...grpc.CallOption) (*CAServiceGetChainResponse, error)
|
|
// IssueCert issues a new leaf certificate from a named issuer. Auth required.
|
|
IssueCert(ctx context.Context, in *IssueCertRequest, opts ...grpc.CallOption) (*IssueCertResponse, error)
|
|
// GetCert retrieves a certificate record by serial number. Auth required.
|
|
GetCert(ctx context.Context, in *GetCertRequest, opts ...grpc.CallOption) (*GetCertResponse, error)
|
|
// ListCerts lists all certificate records for a mount. Auth required.
|
|
ListCerts(ctx context.Context, in *ListCertsRequest, opts ...grpc.CallOption) (*ListCertsResponse, error)
|
|
// RenewCert renews an existing certificate, generating a new key and serial.
|
|
// Auth required.
|
|
RenewCert(ctx context.Context, in *RenewCertRequest, opts ...grpc.CallOption) (*RenewCertResponse, error)
|
|
// SignCSR signs an externally generated CSR with a named issuer. All Subject
|
|
// and SAN fields from the CSR are preserved exactly; profile defaults supply
|
|
// key usages and validity if not overridden. Auth required.
|
|
SignCSR(ctx context.Context, in *SignCSRRequest, opts ...grpc.CallOption) (*SignCSRResponse, error)
|
|
// RevokeCert marks a certificate as revoked by serial number. Admin only.
|
|
RevokeCert(ctx context.Context, in *RevokeCertRequest, opts ...grpc.CallOption) (*RevokeCertResponse, error)
|
|
// DeleteCert permanently removes a certificate record by serial number.
|
|
// Admin only.
|
|
DeleteCert(ctx context.Context, in *DeleteCertRequest, opts ...grpc.CallOption) (*DeleteCertResponse, error)
|
|
}
|
|
|
|
type cAServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewCAServiceClient(cc grpc.ClientConnInterface) CAServiceClient {
|
|
return &cAServiceClient{cc}
|
|
}
|
|
|
|
func (c *cAServiceClient) ImportRoot(ctx context.Context, in *ImportRootRequest, opts ...grpc.CallOption) (*ImportRootResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ImportRootResponse)
|
|
err := c.cc.Invoke(ctx, CAService_ImportRoot_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAServiceClient) GetRoot(ctx context.Context, in *GetRootRequest, opts ...grpc.CallOption) (*GetRootResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetRootResponse)
|
|
err := c.cc.Invoke(ctx, CAService_GetRoot_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAServiceClient) CreateIssuer(ctx context.Context, in *CreateIssuerRequest, opts ...grpc.CallOption) (*CreateIssuerResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CreateIssuerResponse)
|
|
err := c.cc.Invoke(ctx, CAService_CreateIssuer_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAServiceClient) DeleteIssuer(ctx context.Context, in *DeleteIssuerRequest, opts ...grpc.CallOption) (*DeleteIssuerResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(DeleteIssuerResponse)
|
|
err := c.cc.Invoke(ctx, CAService_DeleteIssuer_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAServiceClient) ListIssuers(ctx context.Context, in *ListIssuersRequest, opts ...grpc.CallOption) (*ListIssuersResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListIssuersResponse)
|
|
err := c.cc.Invoke(ctx, CAService_ListIssuers_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAServiceClient) GetIssuer(ctx context.Context, in *GetIssuerRequest, opts ...grpc.CallOption) (*GetIssuerResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetIssuerResponse)
|
|
err := c.cc.Invoke(ctx, CAService_GetIssuer_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAServiceClient) GetChain(ctx context.Context, in *CAServiceGetChainRequest, opts ...grpc.CallOption) (*CAServiceGetChainResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CAServiceGetChainResponse)
|
|
err := c.cc.Invoke(ctx, CAService_GetChain_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAServiceClient) IssueCert(ctx context.Context, in *IssueCertRequest, opts ...grpc.CallOption) (*IssueCertResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(IssueCertResponse)
|
|
err := c.cc.Invoke(ctx, CAService_IssueCert_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAServiceClient) GetCert(ctx context.Context, in *GetCertRequest, opts ...grpc.CallOption) (*GetCertResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetCertResponse)
|
|
err := c.cc.Invoke(ctx, CAService_GetCert_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAServiceClient) ListCerts(ctx context.Context, in *ListCertsRequest, opts ...grpc.CallOption) (*ListCertsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListCertsResponse)
|
|
err := c.cc.Invoke(ctx, CAService_ListCerts_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAServiceClient) RenewCert(ctx context.Context, in *RenewCertRequest, opts ...grpc.CallOption) (*RenewCertResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(RenewCertResponse)
|
|
err := c.cc.Invoke(ctx, CAService_RenewCert_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAServiceClient) SignCSR(ctx context.Context, in *SignCSRRequest, opts ...grpc.CallOption) (*SignCSRResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SignCSRResponse)
|
|
err := c.cc.Invoke(ctx, CAService_SignCSR_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAServiceClient) RevokeCert(ctx context.Context, in *RevokeCertRequest, opts ...grpc.CallOption) (*RevokeCertResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(RevokeCertResponse)
|
|
err := c.cc.Invoke(ctx, CAService_RevokeCert_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAServiceClient) DeleteCert(ctx context.Context, in *DeleteCertRequest, opts ...grpc.CallOption) (*DeleteCertResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(DeleteCertResponse)
|
|
err := c.cc.Invoke(ctx, CAService_DeleteCert_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// CAServiceServer is the server API for CAService service.
|
|
// All implementations must embed UnimplementedCAServiceServer
|
|
// for forward compatibility.
|
|
//
|
|
// CAService provides typed, authenticated access to CA engine operations.
|
|
// All RPCs require the service to be unsealed. Write operations (CreateIssuer,
|
|
// DeleteIssuer, ImportRoot, IssueCert, RenewCert) require authentication.
|
|
// Admin-only operations (CreateIssuer, DeleteIssuer, ImportRoot, RevokeCert,
|
|
// DeleteCert) additionally require the caller to have admin privileges.
|
|
type CAServiceServer interface {
|
|
// ImportRoot imports an existing root CA certificate and private key.
|
|
// Admin only. Only allowed when no valid root exists.
|
|
ImportRoot(context.Context, *ImportRootRequest) (*ImportRootResponse, error)
|
|
// GetRoot returns the root CA certificate for a mount.
|
|
GetRoot(context.Context, *GetRootRequest) (*GetRootResponse, error)
|
|
// CreateIssuer creates a new intermediate CA issuer signed by the root.
|
|
// Admin only.
|
|
CreateIssuer(context.Context, *CreateIssuerRequest) (*CreateIssuerResponse, error)
|
|
// DeleteIssuer removes an issuer and its key material. Admin only.
|
|
DeleteIssuer(context.Context, *DeleteIssuerRequest) (*DeleteIssuerResponse, error)
|
|
// ListIssuers returns the names of all configured issuers. Auth required.
|
|
ListIssuers(context.Context, *ListIssuersRequest) (*ListIssuersResponse, error)
|
|
// GetIssuer returns the PEM-encoded certificate for a named issuer.
|
|
GetIssuer(context.Context, *GetIssuerRequest) (*GetIssuerResponse, error)
|
|
// GetChain returns the full PEM certificate chain for a named issuer.
|
|
GetChain(context.Context, *CAServiceGetChainRequest) (*CAServiceGetChainResponse, error)
|
|
// IssueCert issues a new leaf certificate from a named issuer. Auth required.
|
|
IssueCert(context.Context, *IssueCertRequest) (*IssueCertResponse, error)
|
|
// GetCert retrieves a certificate record by serial number. Auth required.
|
|
GetCert(context.Context, *GetCertRequest) (*GetCertResponse, error)
|
|
// ListCerts lists all certificate records for a mount. Auth required.
|
|
ListCerts(context.Context, *ListCertsRequest) (*ListCertsResponse, error)
|
|
// RenewCert renews an existing certificate, generating a new key and serial.
|
|
// Auth required.
|
|
RenewCert(context.Context, *RenewCertRequest) (*RenewCertResponse, error)
|
|
// SignCSR signs an externally generated CSR with a named issuer. All Subject
|
|
// and SAN fields from the CSR are preserved exactly; profile defaults supply
|
|
// key usages and validity if not overridden. Auth required.
|
|
SignCSR(context.Context, *SignCSRRequest) (*SignCSRResponse, error)
|
|
// RevokeCert marks a certificate as revoked by serial number. Admin only.
|
|
RevokeCert(context.Context, *RevokeCertRequest) (*RevokeCertResponse, error)
|
|
// DeleteCert permanently removes a certificate record by serial number.
|
|
// Admin only.
|
|
DeleteCert(context.Context, *DeleteCertRequest) (*DeleteCertResponse, error)
|
|
mustEmbedUnimplementedCAServiceServer()
|
|
}
|
|
|
|
// UnimplementedCAServiceServer 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 UnimplementedCAServiceServer struct{}
|
|
|
|
func (UnimplementedCAServiceServer) ImportRoot(context.Context, *ImportRootRequest) (*ImportRootResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ImportRoot not implemented")
|
|
}
|
|
func (UnimplementedCAServiceServer) GetRoot(context.Context, *GetRootRequest) (*GetRootResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetRoot not implemented")
|
|
}
|
|
func (UnimplementedCAServiceServer) CreateIssuer(context.Context, *CreateIssuerRequest) (*CreateIssuerResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method CreateIssuer not implemented")
|
|
}
|
|
func (UnimplementedCAServiceServer) DeleteIssuer(context.Context, *DeleteIssuerRequest) (*DeleteIssuerResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method DeleteIssuer not implemented")
|
|
}
|
|
func (UnimplementedCAServiceServer) ListIssuers(context.Context, *ListIssuersRequest) (*ListIssuersResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ListIssuers not implemented")
|
|
}
|
|
func (UnimplementedCAServiceServer) GetIssuer(context.Context, *GetIssuerRequest) (*GetIssuerResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetIssuer not implemented")
|
|
}
|
|
func (UnimplementedCAServiceServer) GetChain(context.Context, *CAServiceGetChainRequest) (*CAServiceGetChainResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetChain not implemented")
|
|
}
|
|
func (UnimplementedCAServiceServer) IssueCert(context.Context, *IssueCertRequest) (*IssueCertResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method IssueCert not implemented")
|
|
}
|
|
func (UnimplementedCAServiceServer) GetCert(context.Context, *GetCertRequest) (*GetCertResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetCert not implemented")
|
|
}
|
|
func (UnimplementedCAServiceServer) ListCerts(context.Context, *ListCertsRequest) (*ListCertsResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ListCerts not implemented")
|
|
}
|
|
func (UnimplementedCAServiceServer) RenewCert(context.Context, *RenewCertRequest) (*RenewCertResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method RenewCert not implemented")
|
|
}
|
|
func (UnimplementedCAServiceServer) SignCSR(context.Context, *SignCSRRequest) (*SignCSRResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SignCSR not implemented")
|
|
}
|
|
func (UnimplementedCAServiceServer) RevokeCert(context.Context, *RevokeCertRequest) (*RevokeCertResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method RevokeCert not implemented")
|
|
}
|
|
func (UnimplementedCAServiceServer) DeleteCert(context.Context, *DeleteCertRequest) (*DeleteCertResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method DeleteCert not implemented")
|
|
}
|
|
func (UnimplementedCAServiceServer) mustEmbedUnimplementedCAServiceServer() {}
|
|
func (UnimplementedCAServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeCAServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to CAServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeCAServiceServer interface {
|
|
mustEmbedUnimplementedCAServiceServer()
|
|
}
|
|
|
|
func RegisterCAServiceServer(s grpc.ServiceRegistrar, srv CAServiceServer) {
|
|
// If the following call panics, it indicates UnimplementedCAServiceServer 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(&CAService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _CAService_ImportRoot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ImportRootRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServiceServer).ImportRoot(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CAService_ImportRoot_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CAServiceServer).ImportRoot(ctx, req.(*ImportRootRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CAService_GetRoot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetRootRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServiceServer).GetRoot(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CAService_GetRoot_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CAServiceServer).GetRoot(ctx, req.(*GetRootRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CAService_CreateIssuer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateIssuerRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServiceServer).CreateIssuer(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CAService_CreateIssuer_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CAServiceServer).CreateIssuer(ctx, req.(*CreateIssuerRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CAService_DeleteIssuer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteIssuerRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServiceServer).DeleteIssuer(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CAService_DeleteIssuer_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CAServiceServer).DeleteIssuer(ctx, req.(*DeleteIssuerRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CAService_ListIssuers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListIssuersRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServiceServer).ListIssuers(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CAService_ListIssuers_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CAServiceServer).ListIssuers(ctx, req.(*ListIssuersRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CAService_GetIssuer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetIssuerRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServiceServer).GetIssuer(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CAService_GetIssuer_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CAServiceServer).GetIssuer(ctx, req.(*GetIssuerRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CAService_GetChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CAServiceGetChainRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServiceServer).GetChain(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CAService_GetChain_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CAServiceServer).GetChain(ctx, req.(*CAServiceGetChainRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CAService_IssueCert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(IssueCertRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServiceServer).IssueCert(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CAService_IssueCert_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CAServiceServer).IssueCert(ctx, req.(*IssueCertRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CAService_GetCert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetCertRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServiceServer).GetCert(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CAService_GetCert_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CAServiceServer).GetCert(ctx, req.(*GetCertRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CAService_ListCerts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListCertsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServiceServer).ListCerts(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CAService_ListCerts_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CAServiceServer).ListCerts(ctx, req.(*ListCertsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CAService_RenewCert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RenewCertRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServiceServer).RenewCert(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CAService_RenewCert_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CAServiceServer).RenewCert(ctx, req.(*RenewCertRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CAService_SignCSR_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SignCSRRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServiceServer).SignCSR(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CAService_SignCSR_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CAServiceServer).SignCSR(ctx, req.(*SignCSRRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CAService_RevokeCert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RevokeCertRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServiceServer).RevokeCert(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CAService_RevokeCert_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CAServiceServer).RevokeCert(ctx, req.(*RevokeCertRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CAService_DeleteCert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteCertRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServiceServer).DeleteCert(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CAService_DeleteCert_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CAServiceServer).DeleteCert(ctx, req.(*DeleteCertRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// CAService_ServiceDesc is the grpc.ServiceDesc for CAService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var CAService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "metacrypt.v2.CAService",
|
|
HandlerType: (*CAServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "ImportRoot",
|
|
Handler: _CAService_ImportRoot_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetRoot",
|
|
Handler: _CAService_GetRoot_Handler,
|
|
},
|
|
{
|
|
MethodName: "CreateIssuer",
|
|
Handler: _CAService_CreateIssuer_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteIssuer",
|
|
Handler: _CAService_DeleteIssuer_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListIssuers",
|
|
Handler: _CAService_ListIssuers_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetIssuer",
|
|
Handler: _CAService_GetIssuer_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetChain",
|
|
Handler: _CAService_GetChain_Handler,
|
|
},
|
|
{
|
|
MethodName: "IssueCert",
|
|
Handler: _CAService_IssueCert_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetCert",
|
|
Handler: _CAService_GetCert_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListCerts",
|
|
Handler: _CAService_ListCerts_Handler,
|
|
},
|
|
{
|
|
MethodName: "RenewCert",
|
|
Handler: _CAService_RenewCert_Handler,
|
|
},
|
|
{
|
|
MethodName: "SignCSR",
|
|
Handler: _CAService_SignCSR_Handler,
|
|
},
|
|
{
|
|
MethodName: "RevokeCert",
|
|
Handler: _CAService_RevokeCert_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteCert",
|
|
Handler: _CAService_DeleteCert_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "proto/metacrypt/v2/ca.proto",
|
|
}
|