query_grpc.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. // versions:
  3. // - protoc-gen-go-grpc v1.2.0
  4. // - protoc v3.12.4
  5. // source: v1/query.proto
  6. package v1
  7. import (
  8. context "context"
  9. request "git.sxidc.com/service-supports/dps-sdk/pb/v1/request"
  10. response "git.sxidc.com/service-supports/dps-sdk/pb/v1/response"
  11. grpc "google.golang.org/grpc"
  12. codes "google.golang.org/grpc/codes"
  13. status "google.golang.org/grpc/status"
  14. )
  15. // This is a compile-time assertion to ensure that this generated file
  16. // is compatible with the grpc package it is being compiled against.
  17. // Requires gRPC-Go v1.32.0 or later.
  18. const _ = grpc.SupportPackageIsVersion7
  19. // QueryServiceClient is the client API for QueryService service.
  20. //
  21. // 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.
  22. type QueryServiceClient interface {
  23. QueryByWhereAndOrderBy(ctx context.Context, in *request.QueryByWhereAndOrderByRequest, opts ...grpc.CallOption) (*response.QueryResponse, error)
  24. CommonQuery(ctx context.Context, in *request.CommonQueryRequest, opts ...grpc.CallOption) (*response.QueryResponse, error)
  25. QueryOnlyByWhereAndOrderBy(ctx context.Context, in *request.QueryByWhereAndOrderByRequest, opts ...grpc.CallOption) (*response.QueryOnlyResponse, error)
  26. CommonQueryOnly(ctx context.Context, in *request.CommonQueryRequest, opts ...grpc.CallOption) (*response.QueryOnlyResponse, error)
  27. QueryByKeys(ctx context.Context, in *request.QueryByKeysRequest, opts ...grpc.CallOption) (*response.QueryByKeysResponse, error)
  28. CountWhere(ctx context.Context, in *request.CountWhereRequest, opts ...grpc.CallOption) (*response.CountResponse, error)
  29. CommonCount(ctx context.Context, in *request.CommonCountRequest, opts ...grpc.CallOption) (*response.CountResponse, error)
  30. }
  31. type queryServiceClient struct {
  32. cc grpc.ClientConnInterface
  33. }
  34. func NewQueryServiceClient(cc grpc.ClientConnInterface) QueryServiceClient {
  35. return &queryServiceClient{cc}
  36. }
  37. func (c *queryServiceClient) QueryByWhereAndOrderBy(ctx context.Context, in *request.QueryByWhereAndOrderByRequest, opts ...grpc.CallOption) (*response.QueryResponse, error) {
  38. out := new(response.QueryResponse)
  39. err := c.cc.Invoke(ctx, "/v1.QueryService/QueryByWhereAndOrderBy", in, out, opts...)
  40. if err != nil {
  41. return nil, err
  42. }
  43. return out, nil
  44. }
  45. func (c *queryServiceClient) CommonQuery(ctx context.Context, in *request.CommonQueryRequest, opts ...grpc.CallOption) (*response.QueryResponse, error) {
  46. out := new(response.QueryResponse)
  47. err := c.cc.Invoke(ctx, "/v1.QueryService/CommonQuery", in, out, opts...)
  48. if err != nil {
  49. return nil, err
  50. }
  51. return out, nil
  52. }
  53. func (c *queryServiceClient) QueryOnlyByWhereAndOrderBy(ctx context.Context, in *request.QueryByWhereAndOrderByRequest, opts ...grpc.CallOption) (*response.QueryOnlyResponse, error) {
  54. out := new(response.QueryOnlyResponse)
  55. err := c.cc.Invoke(ctx, "/v1.QueryService/QueryOnlyByWhereAndOrderBy", in, out, opts...)
  56. if err != nil {
  57. return nil, err
  58. }
  59. return out, nil
  60. }
  61. func (c *queryServiceClient) CommonQueryOnly(ctx context.Context, in *request.CommonQueryRequest, opts ...grpc.CallOption) (*response.QueryOnlyResponse, error) {
  62. out := new(response.QueryOnlyResponse)
  63. err := c.cc.Invoke(ctx, "/v1.QueryService/CommonQueryOnly", in, out, opts...)
  64. if err != nil {
  65. return nil, err
  66. }
  67. return out, nil
  68. }
  69. func (c *queryServiceClient) QueryByKeys(ctx context.Context, in *request.QueryByKeysRequest, opts ...grpc.CallOption) (*response.QueryByKeysResponse, error) {
  70. out := new(response.QueryByKeysResponse)
  71. err := c.cc.Invoke(ctx, "/v1.QueryService/QueryByKeys", in, out, opts...)
  72. if err != nil {
  73. return nil, err
  74. }
  75. return out, nil
  76. }
  77. func (c *queryServiceClient) CountWhere(ctx context.Context, in *request.CountWhereRequest, opts ...grpc.CallOption) (*response.CountResponse, error) {
  78. out := new(response.CountResponse)
  79. err := c.cc.Invoke(ctx, "/v1.QueryService/CountWhere", in, out, opts...)
  80. if err != nil {
  81. return nil, err
  82. }
  83. return out, nil
  84. }
  85. func (c *queryServiceClient) CommonCount(ctx context.Context, in *request.CommonCountRequest, opts ...grpc.CallOption) (*response.CountResponse, error) {
  86. out := new(response.CountResponse)
  87. err := c.cc.Invoke(ctx, "/v1.QueryService/CommonCount", in, out, opts...)
  88. if err != nil {
  89. return nil, err
  90. }
  91. return out, nil
  92. }
  93. // QueryServiceServer is the server API for QueryService service.
  94. // All implementations must embed UnimplementedQueryServiceServer
  95. // for forward compatibility
  96. type QueryServiceServer interface {
  97. QueryByWhereAndOrderBy(context.Context, *request.QueryByWhereAndOrderByRequest) (*response.QueryResponse, error)
  98. CommonQuery(context.Context, *request.CommonQueryRequest) (*response.QueryResponse, error)
  99. QueryOnlyByWhereAndOrderBy(context.Context, *request.QueryByWhereAndOrderByRequest) (*response.QueryOnlyResponse, error)
  100. CommonQueryOnly(context.Context, *request.CommonQueryRequest) (*response.QueryOnlyResponse, error)
  101. QueryByKeys(context.Context, *request.QueryByKeysRequest) (*response.QueryByKeysResponse, error)
  102. CountWhere(context.Context, *request.CountWhereRequest) (*response.CountResponse, error)
  103. CommonCount(context.Context, *request.CommonCountRequest) (*response.CountResponse, error)
  104. mustEmbedUnimplementedQueryServiceServer()
  105. }
  106. // UnimplementedQueryServiceServer must be embedded to have forward compatible implementations.
  107. type UnimplementedQueryServiceServer struct {
  108. }
  109. func (UnimplementedQueryServiceServer) QueryByWhereAndOrderBy(context.Context, *request.QueryByWhereAndOrderByRequest) (*response.QueryResponse, error) {
  110. return nil, status.Errorf(codes.Unimplemented, "method QueryByWhereAndOrderBy not implemented")
  111. }
  112. func (UnimplementedQueryServiceServer) CommonQuery(context.Context, *request.CommonQueryRequest) (*response.QueryResponse, error) {
  113. return nil, status.Errorf(codes.Unimplemented, "method CommonQuery not implemented")
  114. }
  115. func (UnimplementedQueryServiceServer) QueryOnlyByWhereAndOrderBy(context.Context, *request.QueryByWhereAndOrderByRequest) (*response.QueryOnlyResponse, error) {
  116. return nil, status.Errorf(codes.Unimplemented, "method QueryOnlyByWhereAndOrderBy not implemented")
  117. }
  118. func (UnimplementedQueryServiceServer) CommonQueryOnly(context.Context, *request.CommonQueryRequest) (*response.QueryOnlyResponse, error) {
  119. return nil, status.Errorf(codes.Unimplemented, "method CommonQueryOnly not implemented")
  120. }
  121. func (UnimplementedQueryServiceServer) QueryByKeys(context.Context, *request.QueryByKeysRequest) (*response.QueryByKeysResponse, error) {
  122. return nil, status.Errorf(codes.Unimplemented, "method QueryByKeys not implemented")
  123. }
  124. func (UnimplementedQueryServiceServer) CountWhere(context.Context, *request.CountWhereRequest) (*response.CountResponse, error) {
  125. return nil, status.Errorf(codes.Unimplemented, "method CountWhere not implemented")
  126. }
  127. func (UnimplementedQueryServiceServer) CommonCount(context.Context, *request.CommonCountRequest) (*response.CountResponse, error) {
  128. return nil, status.Errorf(codes.Unimplemented, "method CommonCount not implemented")
  129. }
  130. func (UnimplementedQueryServiceServer) mustEmbedUnimplementedQueryServiceServer() {}
  131. // UnsafeQueryServiceServer may be embedded to opt out of forward compatibility for this service.
  132. // Use of this interface is not recommended, as added methods to QueryServiceServer will
  133. // result in compilation errors.
  134. type UnsafeQueryServiceServer interface {
  135. mustEmbedUnimplementedQueryServiceServer()
  136. }
  137. func RegisterQueryServiceServer(s grpc.ServiceRegistrar, srv QueryServiceServer) {
  138. s.RegisterService(&QueryService_ServiceDesc, srv)
  139. }
  140. func _QueryService_QueryByWhereAndOrderBy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  141. in := new(request.QueryByWhereAndOrderByRequest)
  142. if err := dec(in); err != nil {
  143. return nil, err
  144. }
  145. if interceptor == nil {
  146. return srv.(QueryServiceServer).QueryByWhereAndOrderBy(ctx, in)
  147. }
  148. info := &grpc.UnaryServerInfo{
  149. Server: srv,
  150. FullMethod: "/v1.QueryService/QueryByWhereAndOrderBy",
  151. }
  152. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  153. return srv.(QueryServiceServer).QueryByWhereAndOrderBy(ctx, req.(*request.QueryByWhereAndOrderByRequest))
  154. }
  155. return interceptor(ctx, in, info, handler)
  156. }
  157. func _QueryService_CommonQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  158. in := new(request.CommonQueryRequest)
  159. if err := dec(in); err != nil {
  160. return nil, err
  161. }
  162. if interceptor == nil {
  163. return srv.(QueryServiceServer).CommonQuery(ctx, in)
  164. }
  165. info := &grpc.UnaryServerInfo{
  166. Server: srv,
  167. FullMethod: "/v1.QueryService/CommonQuery",
  168. }
  169. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  170. return srv.(QueryServiceServer).CommonQuery(ctx, req.(*request.CommonQueryRequest))
  171. }
  172. return interceptor(ctx, in, info, handler)
  173. }
  174. func _QueryService_QueryOnlyByWhereAndOrderBy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  175. in := new(request.QueryByWhereAndOrderByRequest)
  176. if err := dec(in); err != nil {
  177. return nil, err
  178. }
  179. if interceptor == nil {
  180. return srv.(QueryServiceServer).QueryOnlyByWhereAndOrderBy(ctx, in)
  181. }
  182. info := &grpc.UnaryServerInfo{
  183. Server: srv,
  184. FullMethod: "/v1.QueryService/QueryOnlyByWhereAndOrderBy",
  185. }
  186. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  187. return srv.(QueryServiceServer).QueryOnlyByWhereAndOrderBy(ctx, req.(*request.QueryByWhereAndOrderByRequest))
  188. }
  189. return interceptor(ctx, in, info, handler)
  190. }
  191. func _QueryService_CommonQueryOnly_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  192. in := new(request.CommonQueryRequest)
  193. if err := dec(in); err != nil {
  194. return nil, err
  195. }
  196. if interceptor == nil {
  197. return srv.(QueryServiceServer).CommonQueryOnly(ctx, in)
  198. }
  199. info := &grpc.UnaryServerInfo{
  200. Server: srv,
  201. FullMethod: "/v1.QueryService/CommonQueryOnly",
  202. }
  203. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  204. return srv.(QueryServiceServer).CommonQueryOnly(ctx, req.(*request.CommonQueryRequest))
  205. }
  206. return interceptor(ctx, in, info, handler)
  207. }
  208. func _QueryService_QueryByKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  209. in := new(request.QueryByKeysRequest)
  210. if err := dec(in); err != nil {
  211. return nil, err
  212. }
  213. if interceptor == nil {
  214. return srv.(QueryServiceServer).QueryByKeys(ctx, in)
  215. }
  216. info := &grpc.UnaryServerInfo{
  217. Server: srv,
  218. FullMethod: "/v1.QueryService/QueryByKeys",
  219. }
  220. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  221. return srv.(QueryServiceServer).QueryByKeys(ctx, req.(*request.QueryByKeysRequest))
  222. }
  223. return interceptor(ctx, in, info, handler)
  224. }
  225. func _QueryService_CountWhere_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  226. in := new(request.CountWhereRequest)
  227. if err := dec(in); err != nil {
  228. return nil, err
  229. }
  230. if interceptor == nil {
  231. return srv.(QueryServiceServer).CountWhere(ctx, in)
  232. }
  233. info := &grpc.UnaryServerInfo{
  234. Server: srv,
  235. FullMethod: "/v1.QueryService/CountWhere",
  236. }
  237. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  238. return srv.(QueryServiceServer).CountWhere(ctx, req.(*request.CountWhereRequest))
  239. }
  240. return interceptor(ctx, in, info, handler)
  241. }
  242. func _QueryService_CommonCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  243. in := new(request.CommonCountRequest)
  244. if err := dec(in); err != nil {
  245. return nil, err
  246. }
  247. if interceptor == nil {
  248. return srv.(QueryServiceServer).CommonCount(ctx, in)
  249. }
  250. info := &grpc.UnaryServerInfo{
  251. Server: srv,
  252. FullMethod: "/v1.QueryService/CommonCount",
  253. }
  254. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  255. return srv.(QueryServiceServer).CommonCount(ctx, req.(*request.CommonCountRequest))
  256. }
  257. return interceptor(ctx, in, info, handler)
  258. }
  259. // QueryService_ServiceDesc is the grpc.ServiceDesc for QueryService service.
  260. // It's only intended for direct use with grpc.RegisterService,
  261. // and not to be introspected or modified (even as a copy)
  262. var QueryService_ServiceDesc = grpc.ServiceDesc{
  263. ServiceName: "v1.QueryService",
  264. HandlerType: (*QueryServiceServer)(nil),
  265. Methods: []grpc.MethodDesc{
  266. {
  267. MethodName: "QueryByWhereAndOrderBy",
  268. Handler: _QueryService_QueryByWhereAndOrderBy_Handler,
  269. },
  270. {
  271. MethodName: "CommonQuery",
  272. Handler: _QueryService_CommonQuery_Handler,
  273. },
  274. {
  275. MethodName: "QueryOnlyByWhereAndOrderBy",
  276. Handler: _QueryService_QueryOnlyByWhereAndOrderBy_Handler,
  277. },
  278. {
  279. MethodName: "CommonQueryOnly",
  280. Handler: _QueryService_CommonQueryOnly_Handler,
  281. },
  282. {
  283. MethodName: "QueryByKeys",
  284. Handler: _QueryService_QueryByKeys_Handler,
  285. },
  286. {
  287. MethodName: "CountWhere",
  288. Handler: _QueryService_CountWhere_Handler,
  289. },
  290. {
  291. MethodName: "CommonCount",
  292. Handler: _QueryService_CommonCount_Handler,
  293. },
  294. },
  295. Streams: []grpc.StreamDesc{},
  296. Metadata: "v1/query.proto",
  297. }