dr_protocol_idl_grpc.pb.go 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  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_protocol_idl.proto
  6. package dr_protocol_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.protocol.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.protocol.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_protocol_idl.proto",
  106. }
  107. const (
  108. Protocol_GetPatientTypeList_FullMethodName = "/dr.protocol.Protocol/GetPatientTypeList"
  109. Protocol_GetBodyPartList_FullMethodName = "/dr.protocol.Protocol/GetBodyPartList"
  110. Protocol_GetProcedureList_FullMethodName = "/dr.protocol.Protocol/GetProcedureList"
  111. Protocol_GetProcedure_FullMethodName = "/dr.protocol.Protocol/GetProcedure"
  112. Protocol_GetViewList_FullMethodName = "/dr.protocol.Protocol/GetViewList"
  113. Protocol_GetView_FullMethodName = "/dr.protocol.Protocol/GetView"
  114. )
  115. // ProtocolClient is the client API for Protocol service.
  116. //
  117. // 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.
  118. type ProtocolClient interface {
  119. GetPatientTypeList(ctx context.Context, in *PatientTypeRequest, opts ...grpc.CallOption) (*PatientTypeReply, error)
  120. GetBodyPartList(ctx context.Context, in *BodyPartRequest, opts ...grpc.CallOption) (*BodyPartReply, error)
  121. GetProcedureList(ctx context.Context, in *ProcedureRequest, opts ...grpc.CallOption) (*ProcedureReply, error)
  122. GetProcedure(ctx context.Context, in *IDRequest, opts ...grpc.CallOption) (*Procedure, error)
  123. GetViewList(ctx context.Context, in *ViewRequest, opts ...grpc.CallOption) (*ViewReply, error)
  124. GetView(ctx context.Context, in *IDRequest, opts ...grpc.CallOption) (*View, error)
  125. }
  126. type protocolClient struct {
  127. cc grpc.ClientConnInterface
  128. }
  129. func NewProtocolClient(cc grpc.ClientConnInterface) ProtocolClient {
  130. return &protocolClient{cc}
  131. }
  132. func (c *protocolClient) GetPatientTypeList(ctx context.Context, in *PatientTypeRequest, opts ...grpc.CallOption) (*PatientTypeReply, error) {
  133. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  134. out := new(PatientTypeReply)
  135. err := c.cc.Invoke(ctx, Protocol_GetPatientTypeList_FullMethodName, in, out, cOpts...)
  136. if err != nil {
  137. return nil, err
  138. }
  139. return out, nil
  140. }
  141. func (c *protocolClient) GetBodyPartList(ctx context.Context, in *BodyPartRequest, opts ...grpc.CallOption) (*BodyPartReply, error) {
  142. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  143. out := new(BodyPartReply)
  144. err := c.cc.Invoke(ctx, Protocol_GetBodyPartList_FullMethodName, in, out, cOpts...)
  145. if err != nil {
  146. return nil, err
  147. }
  148. return out, nil
  149. }
  150. func (c *protocolClient) GetProcedureList(ctx context.Context, in *ProcedureRequest, opts ...grpc.CallOption) (*ProcedureReply, error) {
  151. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  152. out := new(ProcedureReply)
  153. err := c.cc.Invoke(ctx, Protocol_GetProcedureList_FullMethodName, in, out, cOpts...)
  154. if err != nil {
  155. return nil, err
  156. }
  157. return out, nil
  158. }
  159. func (c *protocolClient) GetProcedure(ctx context.Context, in *IDRequest, opts ...grpc.CallOption) (*Procedure, error) {
  160. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  161. out := new(Procedure)
  162. err := c.cc.Invoke(ctx, Protocol_GetProcedure_FullMethodName, in, out, cOpts...)
  163. if err != nil {
  164. return nil, err
  165. }
  166. return out, nil
  167. }
  168. func (c *protocolClient) GetViewList(ctx context.Context, in *ViewRequest, opts ...grpc.CallOption) (*ViewReply, error) {
  169. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  170. out := new(ViewReply)
  171. err := c.cc.Invoke(ctx, Protocol_GetViewList_FullMethodName, in, out, cOpts...)
  172. if err != nil {
  173. return nil, err
  174. }
  175. return out, nil
  176. }
  177. func (c *protocolClient) GetView(ctx context.Context, in *IDRequest, opts ...grpc.CallOption) (*View, error) {
  178. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  179. out := new(View)
  180. err := c.cc.Invoke(ctx, Protocol_GetView_FullMethodName, in, out, cOpts...)
  181. if err != nil {
  182. return nil, err
  183. }
  184. return out, nil
  185. }
  186. // ProtocolServer is the server API for Protocol service.
  187. // All implementations must embed UnimplementedProtocolServer
  188. // for forward compatibility.
  189. type ProtocolServer interface {
  190. GetPatientTypeList(context.Context, *PatientTypeRequest) (*PatientTypeReply, error)
  191. GetBodyPartList(context.Context, *BodyPartRequest) (*BodyPartReply, error)
  192. GetProcedureList(context.Context, *ProcedureRequest) (*ProcedureReply, error)
  193. GetProcedure(context.Context, *IDRequest) (*Procedure, error)
  194. GetViewList(context.Context, *ViewRequest) (*ViewReply, error)
  195. GetView(context.Context, *IDRequest) (*View, error)
  196. mustEmbedUnimplementedProtocolServer()
  197. }
  198. // UnimplementedProtocolServer must be embedded to have
  199. // forward compatible implementations.
  200. //
  201. // NOTE: this should be embedded by value instead of pointer to avoid a nil
  202. // pointer dereference when methods are called.
  203. type UnimplementedProtocolServer struct{}
  204. func (UnimplementedProtocolServer) GetPatientTypeList(context.Context, *PatientTypeRequest) (*PatientTypeReply, error) {
  205. return nil, status.Errorf(codes.Unimplemented, "method GetPatientTypeList not implemented")
  206. }
  207. func (UnimplementedProtocolServer) GetBodyPartList(context.Context, *BodyPartRequest) (*BodyPartReply, error) {
  208. return nil, status.Errorf(codes.Unimplemented, "method GetBodyPartList not implemented")
  209. }
  210. func (UnimplementedProtocolServer) GetProcedureList(context.Context, *ProcedureRequest) (*ProcedureReply, error) {
  211. return nil, status.Errorf(codes.Unimplemented, "method GetProcedureList not implemented")
  212. }
  213. func (UnimplementedProtocolServer) GetProcedure(context.Context, *IDRequest) (*Procedure, error) {
  214. return nil, status.Errorf(codes.Unimplemented, "method GetProcedure not implemented")
  215. }
  216. func (UnimplementedProtocolServer) GetViewList(context.Context, *ViewRequest) (*ViewReply, error) {
  217. return nil, status.Errorf(codes.Unimplemented, "method GetViewList not implemented")
  218. }
  219. func (UnimplementedProtocolServer) GetView(context.Context, *IDRequest) (*View, error) {
  220. return nil, status.Errorf(codes.Unimplemented, "method GetView not implemented")
  221. }
  222. func (UnimplementedProtocolServer) mustEmbedUnimplementedProtocolServer() {}
  223. func (UnimplementedProtocolServer) testEmbeddedByValue() {}
  224. // UnsafeProtocolServer may be embedded to opt out of forward compatibility for this service.
  225. // Use of this interface is not recommended, as added methods to ProtocolServer will
  226. // result in compilation errors.
  227. type UnsafeProtocolServer interface {
  228. mustEmbedUnimplementedProtocolServer()
  229. }
  230. func RegisterProtocolServer(s grpc.ServiceRegistrar, srv ProtocolServer) {
  231. // If the following call pancis, it indicates UnimplementedProtocolServer was
  232. // embedded by pointer and is nil. This will cause panics if an
  233. // unimplemented method is ever invoked, so we test this at initialization
  234. // time to prevent it from happening at runtime later due to I/O.
  235. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
  236. t.testEmbeddedByValue()
  237. }
  238. s.RegisterService(&Protocol_ServiceDesc, srv)
  239. }
  240. func _Protocol_GetPatientTypeList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  241. in := new(PatientTypeRequest)
  242. if err := dec(in); err != nil {
  243. return nil, err
  244. }
  245. if interceptor == nil {
  246. return srv.(ProtocolServer).GetPatientTypeList(ctx, in)
  247. }
  248. info := &grpc.UnaryServerInfo{
  249. Server: srv,
  250. FullMethod: Protocol_GetPatientTypeList_FullMethodName,
  251. }
  252. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  253. return srv.(ProtocolServer).GetPatientTypeList(ctx, req.(*PatientTypeRequest))
  254. }
  255. return interceptor(ctx, in, info, handler)
  256. }
  257. func _Protocol_GetBodyPartList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  258. in := new(BodyPartRequest)
  259. if err := dec(in); err != nil {
  260. return nil, err
  261. }
  262. if interceptor == nil {
  263. return srv.(ProtocolServer).GetBodyPartList(ctx, in)
  264. }
  265. info := &grpc.UnaryServerInfo{
  266. Server: srv,
  267. FullMethod: Protocol_GetBodyPartList_FullMethodName,
  268. }
  269. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  270. return srv.(ProtocolServer).GetBodyPartList(ctx, req.(*BodyPartRequest))
  271. }
  272. return interceptor(ctx, in, info, handler)
  273. }
  274. func _Protocol_GetProcedureList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  275. in := new(ProcedureRequest)
  276. if err := dec(in); err != nil {
  277. return nil, err
  278. }
  279. if interceptor == nil {
  280. return srv.(ProtocolServer).GetProcedureList(ctx, in)
  281. }
  282. info := &grpc.UnaryServerInfo{
  283. Server: srv,
  284. FullMethod: Protocol_GetProcedureList_FullMethodName,
  285. }
  286. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  287. return srv.(ProtocolServer).GetProcedureList(ctx, req.(*ProcedureRequest))
  288. }
  289. return interceptor(ctx, in, info, handler)
  290. }
  291. func _Protocol_GetProcedure_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  292. in := new(IDRequest)
  293. if err := dec(in); err != nil {
  294. return nil, err
  295. }
  296. if interceptor == nil {
  297. return srv.(ProtocolServer).GetProcedure(ctx, in)
  298. }
  299. info := &grpc.UnaryServerInfo{
  300. Server: srv,
  301. FullMethod: Protocol_GetProcedure_FullMethodName,
  302. }
  303. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  304. return srv.(ProtocolServer).GetProcedure(ctx, req.(*IDRequest))
  305. }
  306. return interceptor(ctx, in, info, handler)
  307. }
  308. func _Protocol_GetViewList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  309. in := new(ViewRequest)
  310. if err := dec(in); err != nil {
  311. return nil, err
  312. }
  313. if interceptor == nil {
  314. return srv.(ProtocolServer).GetViewList(ctx, in)
  315. }
  316. info := &grpc.UnaryServerInfo{
  317. Server: srv,
  318. FullMethod: Protocol_GetViewList_FullMethodName,
  319. }
  320. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  321. return srv.(ProtocolServer).GetViewList(ctx, req.(*ViewRequest))
  322. }
  323. return interceptor(ctx, in, info, handler)
  324. }
  325. func _Protocol_GetView_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  326. in := new(IDRequest)
  327. if err := dec(in); err != nil {
  328. return nil, err
  329. }
  330. if interceptor == nil {
  331. return srv.(ProtocolServer).GetView(ctx, in)
  332. }
  333. info := &grpc.UnaryServerInfo{
  334. Server: srv,
  335. FullMethod: Protocol_GetView_FullMethodName,
  336. }
  337. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  338. return srv.(ProtocolServer).GetView(ctx, req.(*IDRequest))
  339. }
  340. return interceptor(ctx, in, info, handler)
  341. }
  342. // Protocol_ServiceDesc is the grpc.ServiceDesc for Protocol service.
  343. // It's only intended for direct use with grpc.RegisterService,
  344. // and not to be introspected or modified (even as a copy)
  345. var Protocol_ServiceDesc = grpc.ServiceDesc{
  346. ServiceName: "dr.protocol.Protocol",
  347. HandlerType: (*ProtocolServer)(nil),
  348. Methods: []grpc.MethodDesc{
  349. {
  350. MethodName: "GetPatientTypeList",
  351. Handler: _Protocol_GetPatientTypeList_Handler,
  352. },
  353. {
  354. MethodName: "GetBodyPartList",
  355. Handler: _Protocol_GetBodyPartList_Handler,
  356. },
  357. {
  358. MethodName: "GetProcedureList",
  359. Handler: _Protocol_GetProcedureList_Handler,
  360. },
  361. {
  362. MethodName: "GetProcedure",
  363. Handler: _Protocol_GetProcedure_Handler,
  364. },
  365. {
  366. MethodName: "GetViewList",
  367. Handler: _Protocol_GetViewList_Handler,
  368. },
  369. {
  370. MethodName: "GetView",
  371. Handler: _Protocol_GetView_Handler,
  372. },
  373. },
  374. Streams: []grpc.StreamDesc{},
  375. Metadata: "dr_protocol_idl.proto",
  376. }