Skip to content
Snippets Groups Projects
quicsep_grpc.pb.go 10 KiB
Newer Older
  • Learn to ignore specific revisions
  • Malte Bauch's avatar
    Malte Bauch committed
    // Version: 28.09.23
    
    // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
    // versions:
    // - protoc-gen-go-grpc v1.3.0
    // - protoc             (unknown)
    // source: internal/quicsep.proto
    
    package quipsecv1
    
    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.32.0 or later.
    const _ = grpc.SupportPackageIsVersion7
    
    const (
    	KmsQkdmCommunicationService_Capabilities_FullMethodName         = "/quipsec.v1.KmsQkdmCommunicationService/Capabilities"
    	KmsQkdmCommunicationService_PushKeys_FullMethodName             = "/quipsec.v1.KmsQkdmCommunicationService/PushKeys"
    	KmsQkdmCommunicationService_QkdmMetadata_FullMethodName         = "/quipsec.v1.KmsQkdmCommunicationService/QkdmMetadata"
    	KmsQkdmCommunicationService_ShutdownNotification_FullMethodName = "/quipsec.v1.KmsQkdmCommunicationService/ShutdownNotification"
    )
    
    // KmsQkdmCommunicationServiceClient is the client API for KmsQkdmCommunicationService 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.
    type KmsQkdmCommunicationServiceClient interface {
    	// Initial information about the QKDM.
    	Capabilities(ctx context.Context, in *CapabilitiesRequest, opts ...grpc.CallOption) (*CapabilitiesResponse, error)
    	// NOTE: A stream could also be considered
    	// Push of keys from the QKDM to KMS in irregular intervals.
    	PushKeys(ctx context.Context, in *PushKeysRequest, opts ...grpc.CallOption) (*PushKeysResponse, error)
    	// Statistics and information about the QKDM.
    	QkdmMetadata(ctx context.Context, in *QkdmMetadataRequest, opts ...grpc.CallOption) (*QkdmMetadataResponse, error)
    	// Notification for the KMS on QKDM shutdown.
    	ShutdownNotification(ctx context.Context, in *ShutdownNotificationRequest, opts ...grpc.CallOption) (*ShutdownNotificationResponse, error)
    }
    
    type kmsQkdmCommunicationServiceClient struct {
    	cc grpc.ClientConnInterface
    }
    
    func NewKmsQkdmCommunicationServiceClient(cc grpc.ClientConnInterface) KmsQkdmCommunicationServiceClient {
    	return &kmsQkdmCommunicationServiceClient{cc}
    }
    
    func (c *kmsQkdmCommunicationServiceClient) Capabilities(ctx context.Context, in *CapabilitiesRequest, opts ...grpc.CallOption) (*CapabilitiesResponse, error) {
    	out := new(CapabilitiesResponse)
    	err := c.cc.Invoke(ctx, KmsQkdmCommunicationService_Capabilities_FullMethodName, in, out, opts...)
    	if err != nil {
    		return nil, err
    	}
    	return out, nil
    }
    
    func (c *kmsQkdmCommunicationServiceClient) PushKeys(ctx context.Context, in *PushKeysRequest, opts ...grpc.CallOption) (*PushKeysResponse, error) {
    	out := new(PushKeysResponse)
    	err := c.cc.Invoke(ctx, KmsQkdmCommunicationService_PushKeys_FullMethodName, in, out, opts...)
    	if err != nil {
    		return nil, err
    	}
    	return out, nil
    }
    
    func (c *kmsQkdmCommunicationServiceClient) QkdmMetadata(ctx context.Context, in *QkdmMetadataRequest, opts ...grpc.CallOption) (*QkdmMetadataResponse, error) {
    	out := new(QkdmMetadataResponse)
    	err := c.cc.Invoke(ctx, KmsQkdmCommunicationService_QkdmMetadata_FullMethodName, in, out, opts...)
    	if err != nil {
    		return nil, err
    	}
    	return out, nil
    }
    
    func (c *kmsQkdmCommunicationServiceClient) ShutdownNotification(ctx context.Context, in *ShutdownNotificationRequest, opts ...grpc.CallOption) (*ShutdownNotificationResponse, error) {
    	out := new(ShutdownNotificationResponse)
    	err := c.cc.Invoke(ctx, KmsQkdmCommunicationService_ShutdownNotification_FullMethodName, in, out, opts...)
    	if err != nil {
    		return nil, err
    	}
    	return out, nil
    }
    
    // KmsQkdmCommunicationServiceServer is the server API for KmsQkdmCommunicationService service.
    // All implementations must embed UnimplementedKmsQkdmCommunicationServiceServer
    // for forward compatibility
    type KmsQkdmCommunicationServiceServer interface {
    	// Initial information about the QKDM.
    	Capabilities(context.Context, *CapabilitiesRequest) (*CapabilitiesResponse, error)
    	// NOTE: A stream could also be considered
    	// Push of keys from the QKDM to KMS in irregular intervals.
    	PushKeys(context.Context, *PushKeysRequest) (*PushKeysResponse, error)
    	// Statistics and information about the QKDM.
    	QkdmMetadata(context.Context, *QkdmMetadataRequest) (*QkdmMetadataResponse, error)
    	// Notification for the KMS on QKDM shutdown.
    	ShutdownNotification(context.Context, *ShutdownNotificationRequest) (*ShutdownNotificationResponse, error)
    	mustEmbedUnimplementedKmsQkdmCommunicationServiceServer()
    }
    
    // UnimplementedKmsQkdmCommunicationServiceServer must be embedded to have forward compatible implementations.
    type UnimplementedKmsQkdmCommunicationServiceServer struct {
    }
    
    func (UnimplementedKmsQkdmCommunicationServiceServer) Capabilities(context.Context, *CapabilitiesRequest) (*CapabilitiesResponse, error) {
    	return nil, status.Errorf(codes.Unimplemented, "method Capabilities not implemented")
    }
    func (UnimplementedKmsQkdmCommunicationServiceServer) PushKeys(context.Context, *PushKeysRequest) (*PushKeysResponse, error) {
    	return nil, status.Errorf(codes.Unimplemented, "method PushKeys not implemented")
    }
    func (UnimplementedKmsQkdmCommunicationServiceServer) QkdmMetadata(context.Context, *QkdmMetadataRequest) (*QkdmMetadataResponse, error) {
    	return nil, status.Errorf(codes.Unimplemented, "method QkdmMetadata not implemented")
    }
    func (UnimplementedKmsQkdmCommunicationServiceServer) ShutdownNotification(context.Context, *ShutdownNotificationRequest) (*ShutdownNotificationResponse, error) {
    	return nil, status.Errorf(codes.Unimplemented, "method ShutdownNotification not implemented")
    }
    func (UnimplementedKmsQkdmCommunicationServiceServer) mustEmbedUnimplementedKmsQkdmCommunicationServiceServer() {
    }
    
    // UnsafeKmsQkdmCommunicationServiceServer may be embedded to opt out of forward compatibility for this service.
    // Use of this interface is not recommended, as added methods to KmsQkdmCommunicationServiceServer will
    // result in compilation errors.
    type UnsafeKmsQkdmCommunicationServiceServer interface {
    	mustEmbedUnimplementedKmsQkdmCommunicationServiceServer()
    }
    
    func RegisterKmsQkdmCommunicationServiceServer(s grpc.ServiceRegistrar, srv KmsQkdmCommunicationServiceServer) {
    	s.RegisterService(&KmsQkdmCommunicationService_ServiceDesc, srv)
    }
    
    func _KmsQkdmCommunicationService_Capabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    	in := new(CapabilitiesRequest)
    	if err := dec(in); err != nil {
    		return nil, err
    	}
    	if interceptor == nil {
    		return srv.(KmsQkdmCommunicationServiceServer).Capabilities(ctx, in)
    	}
    	info := &grpc.UnaryServerInfo{
    		Server:     srv,
    		FullMethod: KmsQkdmCommunicationService_Capabilities_FullMethodName,
    	}
    	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
    		return srv.(KmsQkdmCommunicationServiceServer).Capabilities(ctx, req.(*CapabilitiesRequest))
    	}
    	return interceptor(ctx, in, info, handler)
    }
    
    func _KmsQkdmCommunicationService_PushKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    	in := new(PushKeysRequest)
    	if err := dec(in); err != nil {
    		return nil, err
    	}
    	if interceptor == nil {
    		return srv.(KmsQkdmCommunicationServiceServer).PushKeys(ctx, in)
    	}
    	info := &grpc.UnaryServerInfo{
    		Server:     srv,
    		FullMethod: KmsQkdmCommunicationService_PushKeys_FullMethodName,
    	}
    	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
    		return srv.(KmsQkdmCommunicationServiceServer).PushKeys(ctx, req.(*PushKeysRequest))
    	}
    	return interceptor(ctx, in, info, handler)
    }
    
    func _KmsQkdmCommunicationService_QkdmMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    	in := new(QkdmMetadataRequest)
    	if err := dec(in); err != nil {
    		return nil, err
    	}
    	if interceptor == nil {
    		return srv.(KmsQkdmCommunicationServiceServer).QkdmMetadata(ctx, in)
    	}
    	info := &grpc.UnaryServerInfo{
    		Server:     srv,
    		FullMethod: KmsQkdmCommunicationService_QkdmMetadata_FullMethodName,
    	}
    	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
    		return srv.(KmsQkdmCommunicationServiceServer).QkdmMetadata(ctx, req.(*QkdmMetadataRequest))
    	}
    	return interceptor(ctx, in, info, handler)
    }
    
    func _KmsQkdmCommunicationService_ShutdownNotification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    	in := new(ShutdownNotificationRequest)
    	if err := dec(in); err != nil {
    		return nil, err
    	}
    	if interceptor == nil {
    		return srv.(KmsQkdmCommunicationServiceServer).ShutdownNotification(ctx, in)
    	}
    	info := &grpc.UnaryServerInfo{
    		Server:     srv,
    		FullMethod: KmsQkdmCommunicationService_ShutdownNotification_FullMethodName,
    	}
    	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
    		return srv.(KmsQkdmCommunicationServiceServer).ShutdownNotification(ctx, req.(*ShutdownNotificationRequest))
    	}
    	return interceptor(ctx, in, info, handler)
    }
    
    // KmsQkdmCommunicationService_ServiceDesc is the grpc.ServiceDesc for KmsQkdmCommunicationService service.
    // It's only intended for direct use with grpc.RegisterService,
    // and not to be introspected or modified (even as a copy)
    var KmsQkdmCommunicationService_ServiceDesc = grpc.ServiceDesc{
    	ServiceName: "quipsec.v1.KmsQkdmCommunicationService",
    	HandlerType: (*KmsQkdmCommunicationServiceServer)(nil),
    	Methods: []grpc.MethodDesc{
    		{
    			MethodName: "Capabilities",
    			Handler:    _KmsQkdmCommunicationService_Capabilities_Handler,
    		},
    		{
    			MethodName: "PushKeys",
    			Handler:    _KmsQkdmCommunicationService_PushKeys_Handler,
    		},
    		{
    			MethodName: "QkdmMetadata",
    			Handler:    _KmsQkdmCommunicationService_QkdmMetadata_Handler,
    		},
    		{
    			MethodName: "ShutdownNotification",
    			Handler:    _KmsQkdmCommunicationService_ShutdownNotification_Handler,
    		},
    	},
    	Streams:  []grpc.StreamDesc{},
    	Metadata: "internal/quicsep.proto",
    }