dr_dcmtk_idl_grpc.pb.go 7.8 KB

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