123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223 |
- // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
- // versions:
- // - protoc-gen-go-grpc v1.5.1
- // - protoc v6.31.0
- // source: dr_dcmtk_idl.proto
- package dr_dcmtk_pb
- 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 (
- Basic_SoftwareInfo_FullMethodName = "/dr.dcmtk.Basic/SoftwareInfo"
- )
- // BasicClient is the client API for Basic 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 BasicClient interface {
- SoftwareInfo(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*SoftwareInfoReply, error)
- }
- type basicClient struct {
- cc grpc.ClientConnInterface
- }
- func NewBasicClient(cc grpc.ClientConnInterface) BasicClient {
- return &basicClient{cc}
- }
- func (c *basicClient) SoftwareInfo(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*SoftwareInfoReply, error) {
- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(SoftwareInfoReply)
- err := c.cc.Invoke(ctx, Basic_SoftwareInfo_FullMethodName, in, out, cOpts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // BasicServer is the server API for Basic service.
- // All implementations must embed UnimplementedBasicServer
- // for forward compatibility.
- type BasicServer interface {
- SoftwareInfo(context.Context, *EmptyRequest) (*SoftwareInfoReply, error)
- mustEmbedUnimplementedBasicServer()
- }
- // UnimplementedBasicServer 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 UnimplementedBasicServer struct{}
- func (UnimplementedBasicServer) SoftwareInfo(context.Context, *EmptyRequest) (*SoftwareInfoReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method SoftwareInfo not implemented")
- }
- func (UnimplementedBasicServer) mustEmbedUnimplementedBasicServer() {}
- func (UnimplementedBasicServer) testEmbeddedByValue() {}
- // UnsafeBasicServer may be embedded to opt out of forward compatibility for this service.
- // Use of this interface is not recommended, as added methods to BasicServer will
- // result in compilation errors.
- type UnsafeBasicServer interface {
- mustEmbedUnimplementedBasicServer()
- }
- func RegisterBasicServer(s grpc.ServiceRegistrar, srv BasicServer) {
- // If the following call pancis, it indicates UnimplementedBasicServer 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(&Basic_ServiceDesc, srv)
- }
- func _Basic_SoftwareInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(EmptyRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(BasicServer).SoftwareInfo(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Basic_SoftwareInfo_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(BasicServer).SoftwareInfo(ctx, req.(*EmptyRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- // Basic_ServiceDesc is the grpc.ServiceDesc for Basic service.
- // It's only intended for direct use with grpc.RegisterService,
- // and not to be introspected or modified (even as a copy)
- var Basic_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "dr.dcmtk.Basic",
- HandlerType: (*BasicServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "SoftwareInfo",
- Handler: _Basic_SoftwareInfo_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "dr_dcmtk_idl.proto",
- }
- const (
- Dcm_GenerateUniqueIdentifier_FullMethodName = "/dr.dcmtk.Dcm/GenerateUniqueIdentifier"
- )
- // DcmClient is the client API for Dcm 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 DcmClient interface {
- GenerateUniqueIdentifier(ctx context.Context, in *UidRootRequest, opts ...grpc.CallOption) (*UidReply, error)
- }
- type dcmClient struct {
- cc grpc.ClientConnInterface
- }
- func NewDcmClient(cc grpc.ClientConnInterface) DcmClient {
- return &dcmClient{cc}
- }
- func (c *dcmClient) GenerateUniqueIdentifier(ctx context.Context, in *UidRootRequest, opts ...grpc.CallOption) (*UidReply, error) {
- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(UidReply)
- err := c.cc.Invoke(ctx, Dcm_GenerateUniqueIdentifier_FullMethodName, in, out, cOpts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // DcmServer is the server API for Dcm service.
- // All implementations must embed UnimplementedDcmServer
- // for forward compatibility.
- type DcmServer interface {
- GenerateUniqueIdentifier(context.Context, *UidRootRequest) (*UidReply, error)
- mustEmbedUnimplementedDcmServer()
- }
- // UnimplementedDcmServer 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 UnimplementedDcmServer struct{}
- func (UnimplementedDcmServer) GenerateUniqueIdentifier(context.Context, *UidRootRequest) (*UidReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GenerateUniqueIdentifier not implemented")
- }
- func (UnimplementedDcmServer) mustEmbedUnimplementedDcmServer() {}
- func (UnimplementedDcmServer) testEmbeddedByValue() {}
- // UnsafeDcmServer may be embedded to opt out of forward compatibility for this service.
- // Use of this interface is not recommended, as added methods to DcmServer will
- // result in compilation errors.
- type UnsafeDcmServer interface {
- mustEmbedUnimplementedDcmServer()
- }
- func RegisterDcmServer(s grpc.ServiceRegistrar, srv DcmServer) {
- // If the following call pancis, it indicates UnimplementedDcmServer 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(&Dcm_ServiceDesc, srv)
- }
- func _Dcm_GenerateUniqueIdentifier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(UidRootRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(DcmServer).GenerateUniqueIdentifier(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Dcm_GenerateUniqueIdentifier_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(DcmServer).GenerateUniqueIdentifier(ctx, req.(*UidRootRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- // Dcm_ServiceDesc is the grpc.ServiceDesc for Dcm service.
- // It's only intended for direct use with grpc.RegisterService,
- // and not to be introspected or modified (even as a copy)
- var Dcm_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "dr.dcmtk.Dcm",
- HandlerType: (*DcmServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "GenerateUniqueIdentifier",
- Handler: _Dcm_GenerateUniqueIdentifier_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "dr_dcmtk_idl.proto",
- }
|