dr_dcmtk_idl_grpc.pb.go 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. // versions:
  3. // - protoc-gen-go-grpc v1.5.1
  4. // - protoc v6.31.0
  5. // source: dr_dcmtk_idl.proto
  6. package dr_dcmtk_pb
  7. import (
  8. context "context"
  9. grpc "google.golang.org/grpc"
  10. codes "google.golang.org/grpc/codes"
  11. status "google.golang.org/grpc/status"
  12. emptypb "google.golang.org/protobuf/types/known/emptypb"
  13. )
  14. // This is a compile-time assertion to ensure that this generated file
  15. // is compatible with the grpc package it is being compiled against.
  16. // Requires gRPC-Go v1.64.0 or later.
  17. const _ = grpc.SupportPackageIsVersion9
  18. const (
  19. Basic_SoftwareInfo_FullMethodName = "/dr.dcmtk.Basic/SoftwareInfo"
  20. )
  21. // BasicClient is the client API for Basic service.
  22. //
  23. // 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.
  24. type BasicClient interface {
  25. SoftwareInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*SoftwareInfoReply, error)
  26. }
  27. type basicClient struct {
  28. cc grpc.ClientConnInterface
  29. }
  30. func NewBasicClient(cc grpc.ClientConnInterface) BasicClient {
  31. return &basicClient{cc}
  32. }
  33. func (c *basicClient) SoftwareInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*SoftwareInfoReply, error) {
  34. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  35. out := new(SoftwareInfoReply)
  36. err := c.cc.Invoke(ctx, Basic_SoftwareInfo_FullMethodName, in, out, cOpts...)
  37. if err != nil {
  38. return nil, err
  39. }
  40. return out, nil
  41. }
  42. // BasicServer is the server API for Basic service.
  43. // All implementations must embed UnimplementedBasicServer
  44. // for forward compatibility.
  45. type BasicServer interface {
  46. SoftwareInfo(context.Context, *emptypb.Empty) (*SoftwareInfoReply, error)
  47. mustEmbedUnimplementedBasicServer()
  48. }
  49. // UnimplementedBasicServer must be embedded to have
  50. // forward compatible implementations.
  51. //
  52. // NOTE: this should be embedded by value instead of pointer to avoid a nil
  53. // pointer dereference when methods are called.
  54. type UnimplementedBasicServer struct{}
  55. func (UnimplementedBasicServer) SoftwareInfo(context.Context, *emptypb.Empty) (*SoftwareInfoReply, error) {
  56. return nil, status.Errorf(codes.Unimplemented, "method SoftwareInfo not implemented")
  57. }
  58. func (UnimplementedBasicServer) mustEmbedUnimplementedBasicServer() {}
  59. func (UnimplementedBasicServer) testEmbeddedByValue() {}
  60. // UnsafeBasicServer may be embedded to opt out of forward compatibility for this service.
  61. // Use of this interface is not recommended, as added methods to BasicServer will
  62. // result in compilation errors.
  63. type UnsafeBasicServer interface {
  64. mustEmbedUnimplementedBasicServer()
  65. }
  66. func RegisterBasicServer(s grpc.ServiceRegistrar, srv BasicServer) {
  67. // If the following call pancis, it indicates UnimplementedBasicServer was
  68. // embedded by pointer and is nil. This will cause panics if an
  69. // unimplemented method is ever invoked, so we test this at initialization
  70. // time to prevent it from happening at runtime later due to I/O.
  71. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
  72. t.testEmbeddedByValue()
  73. }
  74. s.RegisterService(&Basic_ServiceDesc, srv)
  75. }
  76. func _Basic_SoftwareInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  77. in := new(emptypb.Empty)
  78. if err := dec(in); err != nil {
  79. return nil, err
  80. }
  81. if interceptor == nil {
  82. return srv.(BasicServer).SoftwareInfo(ctx, in)
  83. }
  84. info := &grpc.UnaryServerInfo{
  85. Server: srv,
  86. FullMethod: Basic_SoftwareInfo_FullMethodName,
  87. }
  88. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  89. return srv.(BasicServer).SoftwareInfo(ctx, req.(*emptypb.Empty))
  90. }
  91. return interceptor(ctx, in, info, handler)
  92. }
  93. // Basic_ServiceDesc is the grpc.ServiceDesc for Basic service.
  94. // It's only intended for direct use with grpc.RegisterService,
  95. // and not to be introspected or modified (even as a copy)
  96. var Basic_ServiceDesc = grpc.ServiceDesc{
  97. ServiceName: "dr.dcmtk.Basic",
  98. HandlerType: (*BasicServer)(nil),
  99. Methods: []grpc.MethodDesc{
  100. {
  101. MethodName: "SoftwareInfo",
  102. Handler: _Basic_SoftwareInfo_Handler,
  103. },
  104. },
  105. Streams: []grpc.StreamDesc{},
  106. Metadata: "dr_dcmtk_idl.proto",
  107. }
  108. const (
  109. Dcm_GenerateUniqueIdentifier_FullMethodName = "/dr.dcmtk.Dcm/GenerateUniqueIdentifier"
  110. )
  111. // DcmClient is the client API for Dcm service.
  112. //
  113. // 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.
  114. type DcmClient interface {
  115. GenerateUniqueIdentifier(ctx context.Context, in *UidRootRequest, opts ...grpc.CallOption) (*UidReply, error)
  116. }
  117. type dcmClient struct {
  118. cc grpc.ClientConnInterface
  119. }
  120. func NewDcmClient(cc grpc.ClientConnInterface) DcmClient {
  121. return &dcmClient{cc}
  122. }
  123. func (c *dcmClient) GenerateUniqueIdentifier(ctx context.Context, in *UidRootRequest, opts ...grpc.CallOption) (*UidReply, error) {
  124. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  125. out := new(UidReply)
  126. err := c.cc.Invoke(ctx, Dcm_GenerateUniqueIdentifier_FullMethodName, in, out, cOpts...)
  127. if err != nil {
  128. return nil, err
  129. }
  130. return out, nil
  131. }
  132. // DcmServer is the server API for Dcm service.
  133. // All implementations must embed UnimplementedDcmServer
  134. // for forward compatibility.
  135. type DcmServer interface {
  136. GenerateUniqueIdentifier(context.Context, *UidRootRequest) (*UidReply, error)
  137. mustEmbedUnimplementedDcmServer()
  138. }
  139. // UnimplementedDcmServer must be embedded to have
  140. // forward compatible implementations.
  141. //
  142. // NOTE: this should be embedded by value instead of pointer to avoid a nil
  143. // pointer dereference when methods are called.
  144. type UnimplementedDcmServer struct{}
  145. func (UnimplementedDcmServer) GenerateUniqueIdentifier(context.Context, *UidRootRequest) (*UidReply, error) {
  146. return nil, status.Errorf(codes.Unimplemented, "method GenerateUniqueIdentifier not implemented")
  147. }
  148. func (UnimplementedDcmServer) mustEmbedUnimplementedDcmServer() {}
  149. func (UnimplementedDcmServer) testEmbeddedByValue() {}
  150. // UnsafeDcmServer may be embedded to opt out of forward compatibility for this service.
  151. // Use of this interface is not recommended, as added methods to DcmServer will
  152. // result in compilation errors.
  153. type UnsafeDcmServer interface {
  154. mustEmbedUnimplementedDcmServer()
  155. }
  156. func RegisterDcmServer(s grpc.ServiceRegistrar, srv DcmServer) {
  157. // If the following call pancis, it indicates UnimplementedDcmServer was
  158. // embedded by pointer and is nil. This will cause panics if an
  159. // unimplemented method is ever invoked, so we test this at initialization
  160. // time to prevent it from happening at runtime later due to I/O.
  161. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
  162. t.testEmbeddedByValue()
  163. }
  164. s.RegisterService(&Dcm_ServiceDesc, srv)
  165. }
  166. func _Dcm_GenerateUniqueIdentifier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  167. in := new(UidRootRequest)
  168. if err := dec(in); err != nil {
  169. return nil, err
  170. }
  171. if interceptor == nil {
  172. return srv.(DcmServer).GenerateUniqueIdentifier(ctx, in)
  173. }
  174. info := &grpc.UnaryServerInfo{
  175. Server: srv,
  176. FullMethod: Dcm_GenerateUniqueIdentifier_FullMethodName,
  177. }
  178. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  179. return srv.(DcmServer).GenerateUniqueIdentifier(ctx, req.(*UidRootRequest))
  180. }
  181. return interceptor(ctx, in, info, handler)
  182. }
  183. // Dcm_ServiceDesc is the grpc.ServiceDesc for Dcm service.
  184. // It's only intended for direct use with grpc.RegisterService,
  185. // and not to be introspected or modified (even as a copy)
  186. var Dcm_ServiceDesc = grpc.ServiceDesc{
  187. ServiceName: "dr.dcmtk.Dcm",
  188. HandlerType: (*DcmServer)(nil),
  189. Methods: []grpc.MethodDesc{
  190. {
  191. MethodName: "GenerateUniqueIdentifier",
  192. Handler: _Dcm_GenerateUniqueIdentifier_Handler,
  193. },
  194. },
  195. Streams: []grpc.StreamDesc{},
  196. Metadata: "dr_dcmtk_idl.proto",
  197. }