dr_resource_idl_grpc.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  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_resource_idl.proto
  6. package dr_resource_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.resource.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.resource.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_resource_idl.proto",
  107. }
  108. const (
  109. Config_GetOptions_FullMethodName = "/dr.resource.Config/GetOptions"
  110. Config_ConfigOptionList_FullMethodName = "/dr.resource.Config/ConfigOptionList"
  111. Config_ConfigList_FullMethodName = "/dr.resource.Config/ConfigList"
  112. Config_UpdateConfigItems_FullMethodName = "/dr.resource.Config/UpdateConfigItems"
  113. )
  114. // ConfigClient is the client API for Config service.
  115. //
  116. // 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.
  117. type ConfigClient interface {
  118. GetOptions(ctx context.Context, in *OptionRequest, opts ...grpc.CallOption) (*OptionReply, error)
  119. ConfigOptionList(ctx context.Context, in *ConfigOptionListRequest, opts ...grpc.CallOption) (*ConfigOptionListReply, error)
  120. ConfigList(ctx context.Context, in *ConfigListRequest, opts ...grpc.CallOption) (*ConfigListResponse, error)
  121. UpdateConfigItems(ctx context.Context, in *ConfigItemRequest, opts ...grpc.CallOption) (*ConfigListResponse, error)
  122. }
  123. type configClient struct {
  124. cc grpc.ClientConnInterface
  125. }
  126. func NewConfigClient(cc grpc.ClientConnInterface) ConfigClient {
  127. return &configClient{cc}
  128. }
  129. func (c *configClient) GetOptions(ctx context.Context, in *OptionRequest, opts ...grpc.CallOption) (*OptionReply, error) {
  130. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  131. out := new(OptionReply)
  132. err := c.cc.Invoke(ctx, Config_GetOptions_FullMethodName, in, out, cOpts...)
  133. if err != nil {
  134. return nil, err
  135. }
  136. return out, nil
  137. }
  138. func (c *configClient) ConfigOptionList(ctx context.Context, in *ConfigOptionListRequest, opts ...grpc.CallOption) (*ConfigOptionListReply, error) {
  139. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  140. out := new(ConfigOptionListReply)
  141. err := c.cc.Invoke(ctx, Config_ConfigOptionList_FullMethodName, in, out, cOpts...)
  142. if err != nil {
  143. return nil, err
  144. }
  145. return out, nil
  146. }
  147. func (c *configClient) ConfigList(ctx context.Context, in *ConfigListRequest, opts ...grpc.CallOption) (*ConfigListResponse, error) {
  148. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  149. out := new(ConfigListResponse)
  150. err := c.cc.Invoke(ctx, Config_ConfigList_FullMethodName, in, out, cOpts...)
  151. if err != nil {
  152. return nil, err
  153. }
  154. return out, nil
  155. }
  156. func (c *configClient) UpdateConfigItems(ctx context.Context, in *ConfigItemRequest, opts ...grpc.CallOption) (*ConfigListResponse, error) {
  157. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  158. out := new(ConfigListResponse)
  159. err := c.cc.Invoke(ctx, Config_UpdateConfigItems_FullMethodName, in, out, cOpts...)
  160. if err != nil {
  161. return nil, err
  162. }
  163. return out, nil
  164. }
  165. // ConfigServer is the server API for Config service.
  166. // All implementations must embed UnimplementedConfigServer
  167. // for forward compatibility.
  168. type ConfigServer interface {
  169. GetOptions(context.Context, *OptionRequest) (*OptionReply, error)
  170. ConfigOptionList(context.Context, *ConfigOptionListRequest) (*ConfigOptionListReply, error)
  171. ConfigList(context.Context, *ConfigListRequest) (*ConfigListResponse, error)
  172. UpdateConfigItems(context.Context, *ConfigItemRequest) (*ConfigListResponse, error)
  173. mustEmbedUnimplementedConfigServer()
  174. }
  175. // UnimplementedConfigServer must be embedded to have
  176. // forward compatible implementations.
  177. //
  178. // NOTE: this should be embedded by value instead of pointer to avoid a nil
  179. // pointer dereference when methods are called.
  180. type UnimplementedConfigServer struct{}
  181. func (UnimplementedConfigServer) GetOptions(context.Context, *OptionRequest) (*OptionReply, error) {
  182. return nil, status.Errorf(codes.Unimplemented, "method GetOptions not implemented")
  183. }
  184. func (UnimplementedConfigServer) ConfigOptionList(context.Context, *ConfigOptionListRequest) (*ConfigOptionListReply, error) {
  185. return nil, status.Errorf(codes.Unimplemented, "method ConfigOptionList not implemented")
  186. }
  187. func (UnimplementedConfigServer) ConfigList(context.Context, *ConfigListRequest) (*ConfigListResponse, error) {
  188. return nil, status.Errorf(codes.Unimplemented, "method ConfigList not implemented")
  189. }
  190. func (UnimplementedConfigServer) UpdateConfigItems(context.Context, *ConfigItemRequest) (*ConfigListResponse, error) {
  191. return nil, status.Errorf(codes.Unimplemented, "method UpdateConfigItems not implemented")
  192. }
  193. func (UnimplementedConfigServer) mustEmbedUnimplementedConfigServer() {}
  194. func (UnimplementedConfigServer) testEmbeddedByValue() {}
  195. // UnsafeConfigServer may be embedded to opt out of forward compatibility for this service.
  196. // Use of this interface is not recommended, as added methods to ConfigServer will
  197. // result in compilation errors.
  198. type UnsafeConfigServer interface {
  199. mustEmbedUnimplementedConfigServer()
  200. }
  201. func RegisterConfigServer(s grpc.ServiceRegistrar, srv ConfigServer) {
  202. // If the following call pancis, it indicates UnimplementedConfigServer was
  203. // embedded by pointer and is nil. This will cause panics if an
  204. // unimplemented method is ever invoked, so we test this at initialization
  205. // time to prevent it from happening at runtime later due to I/O.
  206. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
  207. t.testEmbeddedByValue()
  208. }
  209. s.RegisterService(&Config_ServiceDesc, srv)
  210. }
  211. func _Config_GetOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  212. in := new(OptionRequest)
  213. if err := dec(in); err != nil {
  214. return nil, err
  215. }
  216. if interceptor == nil {
  217. return srv.(ConfigServer).GetOptions(ctx, in)
  218. }
  219. info := &grpc.UnaryServerInfo{
  220. Server: srv,
  221. FullMethod: Config_GetOptions_FullMethodName,
  222. }
  223. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  224. return srv.(ConfigServer).GetOptions(ctx, req.(*OptionRequest))
  225. }
  226. return interceptor(ctx, in, info, handler)
  227. }
  228. func _Config_ConfigOptionList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  229. in := new(ConfigOptionListRequest)
  230. if err := dec(in); err != nil {
  231. return nil, err
  232. }
  233. if interceptor == nil {
  234. return srv.(ConfigServer).ConfigOptionList(ctx, in)
  235. }
  236. info := &grpc.UnaryServerInfo{
  237. Server: srv,
  238. FullMethod: Config_ConfigOptionList_FullMethodName,
  239. }
  240. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  241. return srv.(ConfigServer).ConfigOptionList(ctx, req.(*ConfigOptionListRequest))
  242. }
  243. return interceptor(ctx, in, info, handler)
  244. }
  245. func _Config_ConfigList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  246. in := new(ConfigListRequest)
  247. if err := dec(in); err != nil {
  248. return nil, err
  249. }
  250. if interceptor == nil {
  251. return srv.(ConfigServer).ConfigList(ctx, in)
  252. }
  253. info := &grpc.UnaryServerInfo{
  254. Server: srv,
  255. FullMethod: Config_ConfigList_FullMethodName,
  256. }
  257. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  258. return srv.(ConfigServer).ConfigList(ctx, req.(*ConfigListRequest))
  259. }
  260. return interceptor(ctx, in, info, handler)
  261. }
  262. func _Config_UpdateConfigItems_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  263. in := new(ConfigItemRequest)
  264. if err := dec(in); err != nil {
  265. return nil, err
  266. }
  267. if interceptor == nil {
  268. return srv.(ConfigServer).UpdateConfigItems(ctx, in)
  269. }
  270. info := &grpc.UnaryServerInfo{
  271. Server: srv,
  272. FullMethod: Config_UpdateConfigItems_FullMethodName,
  273. }
  274. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  275. return srv.(ConfigServer).UpdateConfigItems(ctx, req.(*ConfigItemRequest))
  276. }
  277. return interceptor(ctx, in, info, handler)
  278. }
  279. // Config_ServiceDesc is the grpc.ServiceDesc for Config service.
  280. // It's only intended for direct use with grpc.RegisterService,
  281. // and not to be introspected or modified (even as a copy)
  282. var Config_ServiceDesc = grpc.ServiceDesc{
  283. ServiceName: "dr.resource.Config",
  284. HandlerType: (*ConfigServer)(nil),
  285. Methods: []grpc.MethodDesc{
  286. {
  287. MethodName: "GetOptions",
  288. Handler: _Config_GetOptions_Handler,
  289. },
  290. {
  291. MethodName: "ConfigOptionList",
  292. Handler: _Config_ConfigOptionList_Handler,
  293. },
  294. {
  295. MethodName: "ConfigList",
  296. Handler: _Config_ConfigList_Handler,
  297. },
  298. {
  299. MethodName: "UpdateConfigItems",
  300. Handler: _Config_UpdateConfigItems_Handler,
  301. },
  302. },
  303. Streams: []grpc.StreamDesc{},
  304. Metadata: "dr_resource_idl.proto",
  305. }