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>
242 lines
9.2 KiB
Go
242 lines
9.2 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/pki.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 (
|
|
PKIService_GetRootCert_FullMethodName = "/metacrypt.v2.PKIService/GetRootCert"
|
|
PKIService_GetChain_FullMethodName = "/metacrypt.v2.PKIService/GetChain"
|
|
PKIService_GetIssuerCert_FullMethodName = "/metacrypt.v2.PKIService/GetIssuerCert"
|
|
PKIService_GetCRL_FullMethodName = "/metacrypt.v2.PKIService/GetCRL"
|
|
)
|
|
|
|
// PKIServiceClient is the client API for PKIService 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.
|
|
//
|
|
// PKIService provides unauthenticated access to public CA certificates.
|
|
// These endpoints only require the service to be unsealed.
|
|
type PKIServiceClient interface {
|
|
GetRootCert(ctx context.Context, in *GetRootCertRequest, opts ...grpc.CallOption) (*GetRootCertResponse, error)
|
|
GetChain(ctx context.Context, in *GetChainRequest, opts ...grpc.CallOption) (*GetChainResponse, error)
|
|
GetIssuerCert(ctx context.Context, in *GetIssuerCertRequest, opts ...grpc.CallOption) (*GetIssuerCertResponse, error)
|
|
GetCRL(ctx context.Context, in *GetCRLRequest, opts ...grpc.CallOption) (*GetCRLResponse, error)
|
|
}
|
|
|
|
type pKIServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewPKIServiceClient(cc grpc.ClientConnInterface) PKIServiceClient {
|
|
return &pKIServiceClient{cc}
|
|
}
|
|
|
|
func (c *pKIServiceClient) GetRootCert(ctx context.Context, in *GetRootCertRequest, opts ...grpc.CallOption) (*GetRootCertResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetRootCertResponse)
|
|
err := c.cc.Invoke(ctx, PKIService_GetRootCert_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *pKIServiceClient) GetChain(ctx context.Context, in *GetChainRequest, opts ...grpc.CallOption) (*GetChainResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetChainResponse)
|
|
err := c.cc.Invoke(ctx, PKIService_GetChain_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *pKIServiceClient) GetIssuerCert(ctx context.Context, in *GetIssuerCertRequest, opts ...grpc.CallOption) (*GetIssuerCertResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetIssuerCertResponse)
|
|
err := c.cc.Invoke(ctx, PKIService_GetIssuerCert_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *pKIServiceClient) GetCRL(ctx context.Context, in *GetCRLRequest, opts ...grpc.CallOption) (*GetCRLResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetCRLResponse)
|
|
err := c.cc.Invoke(ctx, PKIService_GetCRL_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// PKIServiceServer is the server API for PKIService service.
|
|
// All implementations must embed UnimplementedPKIServiceServer
|
|
// for forward compatibility.
|
|
//
|
|
// PKIService provides unauthenticated access to public CA certificates.
|
|
// These endpoints only require the service to be unsealed.
|
|
type PKIServiceServer interface {
|
|
GetRootCert(context.Context, *GetRootCertRequest) (*GetRootCertResponse, error)
|
|
GetChain(context.Context, *GetChainRequest) (*GetChainResponse, error)
|
|
GetIssuerCert(context.Context, *GetIssuerCertRequest) (*GetIssuerCertResponse, error)
|
|
GetCRL(context.Context, *GetCRLRequest) (*GetCRLResponse, error)
|
|
mustEmbedUnimplementedPKIServiceServer()
|
|
}
|
|
|
|
// UnimplementedPKIServiceServer 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 UnimplementedPKIServiceServer struct{}
|
|
|
|
func (UnimplementedPKIServiceServer) GetRootCert(context.Context, *GetRootCertRequest) (*GetRootCertResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetRootCert not implemented")
|
|
}
|
|
func (UnimplementedPKIServiceServer) GetChain(context.Context, *GetChainRequest) (*GetChainResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetChain not implemented")
|
|
}
|
|
func (UnimplementedPKIServiceServer) GetIssuerCert(context.Context, *GetIssuerCertRequest) (*GetIssuerCertResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetIssuerCert not implemented")
|
|
}
|
|
func (UnimplementedPKIServiceServer) GetCRL(context.Context, *GetCRLRequest) (*GetCRLResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetCRL not implemented")
|
|
}
|
|
func (UnimplementedPKIServiceServer) mustEmbedUnimplementedPKIServiceServer() {}
|
|
func (UnimplementedPKIServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafePKIServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to PKIServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafePKIServiceServer interface {
|
|
mustEmbedUnimplementedPKIServiceServer()
|
|
}
|
|
|
|
func RegisterPKIServiceServer(s grpc.ServiceRegistrar, srv PKIServiceServer) {
|
|
// If the following call panics, it indicates UnimplementedPKIServiceServer 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(&PKIService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _PKIService_GetRootCert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetRootCertRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PKIServiceServer).GetRootCert(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: PKIService_GetRootCert_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PKIServiceServer).GetRootCert(ctx, req.(*GetRootCertRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _PKIService_GetChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetChainRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PKIServiceServer).GetChain(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: PKIService_GetChain_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PKIServiceServer).GetChain(ctx, req.(*GetChainRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _PKIService_GetIssuerCert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetIssuerCertRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PKIServiceServer).GetIssuerCert(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: PKIService_GetIssuerCert_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PKIServiceServer).GetIssuerCert(ctx, req.(*GetIssuerCertRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _PKIService_GetCRL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetCRLRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PKIServiceServer).GetCRL(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: PKIService_GetCRL_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PKIServiceServer).GetCRL(ctx, req.(*GetCRLRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// PKIService_ServiceDesc is the grpc.ServiceDesc for PKIService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var PKIService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "metacrypt.v2.PKIService",
|
|
HandlerType: (*PKIServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetRootCert",
|
|
Handler: _PKIService_GetRootCert_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetChain",
|
|
Handler: _PKIService_GetChain_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetIssuerCert",
|
|
Handler: _PKIService_GetIssuerCert_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetCRL",
|
|
Handler: _PKIService_GetCRL_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "proto/metacrypt/v2/pki.proto",
|
|
}
|