query_grpc.pb.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  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. QueryByKeys(ctx context.Context, in *request.QueryByKeysRequest, opts ...grpc.CallOption) (*response.QueryByKeysResponse, error)
  26. CommonQueryByKeys(ctx context.Context, in *request.CommonQueryByKeysRequest, opts ...grpc.CallOption) (*response.QueryByKeysResponse, error)
  27. CountWhere(ctx context.Context, in *request.CountWhereRequest, opts ...grpc.CallOption) (*response.CountResponse, error)
  28. CommonCount(ctx context.Context, in *request.CommonCountRequest, opts ...grpc.CallOption) (*response.CountResponse, error)
  29. }
  30. type queryServiceClient struct {
  31. cc grpc.ClientConnInterface
  32. }
  33. func NewQueryServiceClient(cc grpc.ClientConnInterface) QueryServiceClient {
  34. return &queryServiceClient{cc}
  35. }
  36. func (c *queryServiceClient) QueryByWhereAndOrderBy(ctx context.Context, in *request.QueryByWhereAndOrderByRequest, opts ...grpc.CallOption) (*response.QueryResponse, error) {
  37. out := new(response.QueryResponse)
  38. err := c.cc.Invoke(ctx, "/v1.QueryService/QueryByWhereAndOrderBy", in, out, opts...)
  39. if err != nil {
  40. return nil, err
  41. }
  42. return out, nil
  43. }
  44. func (c *queryServiceClient) CommonQuery(ctx context.Context, in *request.CommonQueryRequest, opts ...grpc.CallOption) (*response.QueryResponse, error) {
  45. out := new(response.QueryResponse)
  46. err := c.cc.Invoke(ctx, "/v1.QueryService/CommonQuery", in, out, opts...)
  47. if err != nil {
  48. return nil, err
  49. }
  50. return out, nil
  51. }
  52. func (c *queryServiceClient) QueryByKeys(ctx context.Context, in *request.QueryByKeysRequest, opts ...grpc.CallOption) (*response.QueryByKeysResponse, error) {
  53. out := new(response.QueryByKeysResponse)
  54. err := c.cc.Invoke(ctx, "/v1.QueryService/QueryByKeys", in, out, opts...)
  55. if err != nil {
  56. return nil, err
  57. }
  58. return out, nil
  59. }
  60. func (c *queryServiceClient) CommonQueryByKeys(ctx context.Context, in *request.CommonQueryByKeysRequest, opts ...grpc.CallOption) (*response.QueryByKeysResponse, error) {
  61. out := new(response.QueryByKeysResponse)
  62. err := c.cc.Invoke(ctx, "/v1.QueryService/CommonQueryByKeys", in, out, opts...)
  63. if err != nil {
  64. return nil, err
  65. }
  66. return out, nil
  67. }
  68. func (c *queryServiceClient) CountWhere(ctx context.Context, in *request.CountWhereRequest, opts ...grpc.CallOption) (*response.CountResponse, error) {
  69. out := new(response.CountResponse)
  70. err := c.cc.Invoke(ctx, "/v1.QueryService/CountWhere", in, out, opts...)
  71. if err != nil {
  72. return nil, err
  73. }
  74. return out, nil
  75. }
  76. func (c *queryServiceClient) CommonCount(ctx context.Context, in *request.CommonCountRequest, opts ...grpc.CallOption) (*response.CountResponse, error) {
  77. out := new(response.CountResponse)
  78. err := c.cc.Invoke(ctx, "/v1.QueryService/CommonCount", in, out, opts...)
  79. if err != nil {
  80. return nil, err
  81. }
  82. return out, nil
  83. }
  84. // QueryServiceServer is the server API for QueryService service.
  85. // All implementations must embed UnimplementedQueryServiceServer
  86. // for forward compatibility
  87. type QueryServiceServer interface {
  88. QueryByWhereAndOrderBy(context.Context, *request.QueryByWhereAndOrderByRequest) (*response.QueryResponse, error)
  89. CommonQuery(context.Context, *request.CommonQueryRequest) (*response.QueryResponse, error)
  90. QueryByKeys(context.Context, *request.QueryByKeysRequest) (*response.QueryByKeysResponse, error)
  91. CommonQueryByKeys(context.Context, *request.CommonQueryByKeysRequest) (*response.QueryByKeysResponse, error)
  92. CountWhere(context.Context, *request.CountWhereRequest) (*response.CountResponse, error)
  93. CommonCount(context.Context, *request.CommonCountRequest) (*response.CountResponse, error)
  94. mustEmbedUnimplementedQueryServiceServer()
  95. }
  96. // UnimplementedQueryServiceServer must be embedded to have forward compatible implementations.
  97. type UnimplementedQueryServiceServer struct {
  98. }
  99. func (UnimplementedQueryServiceServer) QueryByWhereAndOrderBy(context.Context, *request.QueryByWhereAndOrderByRequest) (*response.QueryResponse, error) {
  100. return nil, status.Errorf(codes.Unimplemented, "method QueryByWhereAndOrderBy not implemented")
  101. }
  102. func (UnimplementedQueryServiceServer) CommonQuery(context.Context, *request.CommonQueryRequest) (*response.QueryResponse, error) {
  103. return nil, status.Errorf(codes.Unimplemented, "method CommonQuery not implemented")
  104. }
  105. func (UnimplementedQueryServiceServer) QueryByKeys(context.Context, *request.QueryByKeysRequest) (*response.QueryByKeysResponse, error) {
  106. return nil, status.Errorf(codes.Unimplemented, "method QueryByKeys not implemented")
  107. }
  108. func (UnimplementedQueryServiceServer) CommonQueryByKeys(context.Context, *request.CommonQueryByKeysRequest) (*response.QueryByKeysResponse, error) {
  109. return nil, status.Errorf(codes.Unimplemented, "method CommonQueryByKeys not implemented")
  110. }
  111. func (UnimplementedQueryServiceServer) CountWhere(context.Context, *request.CountWhereRequest) (*response.CountResponse, error) {
  112. return nil, status.Errorf(codes.Unimplemented, "method CountWhere not implemented")
  113. }
  114. func (UnimplementedQueryServiceServer) CommonCount(context.Context, *request.CommonCountRequest) (*response.CountResponse, error) {
  115. return nil, status.Errorf(codes.Unimplemented, "method CommonCount not implemented")
  116. }
  117. func (UnimplementedQueryServiceServer) mustEmbedUnimplementedQueryServiceServer() {}
  118. // UnsafeQueryServiceServer may be embedded to opt out of forward compatibility for this service.
  119. // Use of this interface is not recommended, as added methods to QueryServiceServer will
  120. // result in compilation errors.
  121. type UnsafeQueryServiceServer interface {
  122. mustEmbedUnimplementedQueryServiceServer()
  123. }
  124. func RegisterQueryServiceServer(s grpc.ServiceRegistrar, srv QueryServiceServer) {
  125. s.RegisterService(&QueryService_ServiceDesc, srv)
  126. }
  127. func _QueryService_QueryByWhereAndOrderBy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  128. in := new(request.QueryByWhereAndOrderByRequest)
  129. if err := dec(in); err != nil {
  130. return nil, err
  131. }
  132. if interceptor == nil {
  133. return srv.(QueryServiceServer).QueryByWhereAndOrderBy(ctx, in)
  134. }
  135. info := &grpc.UnaryServerInfo{
  136. Server: srv,
  137. FullMethod: "/v1.QueryService/QueryByWhereAndOrderBy",
  138. }
  139. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  140. return srv.(QueryServiceServer).QueryByWhereAndOrderBy(ctx, req.(*request.QueryByWhereAndOrderByRequest))
  141. }
  142. return interceptor(ctx, in, info, handler)
  143. }
  144. func _QueryService_CommonQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  145. in := new(request.CommonQueryRequest)
  146. if err := dec(in); err != nil {
  147. return nil, err
  148. }
  149. if interceptor == nil {
  150. return srv.(QueryServiceServer).CommonQuery(ctx, in)
  151. }
  152. info := &grpc.UnaryServerInfo{
  153. Server: srv,
  154. FullMethod: "/v1.QueryService/CommonQuery",
  155. }
  156. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  157. return srv.(QueryServiceServer).CommonQuery(ctx, req.(*request.CommonQueryRequest))
  158. }
  159. return interceptor(ctx, in, info, handler)
  160. }
  161. func _QueryService_QueryByKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  162. in := new(request.QueryByKeysRequest)
  163. if err := dec(in); err != nil {
  164. return nil, err
  165. }
  166. if interceptor == nil {
  167. return srv.(QueryServiceServer).QueryByKeys(ctx, in)
  168. }
  169. info := &grpc.UnaryServerInfo{
  170. Server: srv,
  171. FullMethod: "/v1.QueryService/QueryByKeys",
  172. }
  173. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  174. return srv.(QueryServiceServer).QueryByKeys(ctx, req.(*request.QueryByKeysRequest))
  175. }
  176. return interceptor(ctx, in, info, handler)
  177. }
  178. func _QueryService_CommonQueryByKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  179. in := new(request.CommonQueryByKeysRequest)
  180. if err := dec(in); err != nil {
  181. return nil, err
  182. }
  183. if interceptor == nil {
  184. return srv.(QueryServiceServer).CommonQueryByKeys(ctx, in)
  185. }
  186. info := &grpc.UnaryServerInfo{
  187. Server: srv,
  188. FullMethod: "/v1.QueryService/CommonQueryByKeys",
  189. }
  190. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  191. return srv.(QueryServiceServer).CommonQueryByKeys(ctx, req.(*request.CommonQueryByKeysRequest))
  192. }
  193. return interceptor(ctx, in, info, handler)
  194. }
  195. func _QueryService_CountWhere_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  196. in := new(request.CountWhereRequest)
  197. if err := dec(in); err != nil {
  198. return nil, err
  199. }
  200. if interceptor == nil {
  201. return srv.(QueryServiceServer).CountWhere(ctx, in)
  202. }
  203. info := &grpc.UnaryServerInfo{
  204. Server: srv,
  205. FullMethod: "/v1.QueryService/CountWhere",
  206. }
  207. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  208. return srv.(QueryServiceServer).CountWhere(ctx, req.(*request.CountWhereRequest))
  209. }
  210. return interceptor(ctx, in, info, handler)
  211. }
  212. func _QueryService_CommonCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  213. in := new(request.CommonCountRequest)
  214. if err := dec(in); err != nil {
  215. return nil, err
  216. }
  217. if interceptor == nil {
  218. return srv.(QueryServiceServer).CommonCount(ctx, in)
  219. }
  220. info := &grpc.UnaryServerInfo{
  221. Server: srv,
  222. FullMethod: "/v1.QueryService/CommonCount",
  223. }
  224. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  225. return srv.(QueryServiceServer).CommonCount(ctx, req.(*request.CommonCountRequest))
  226. }
  227. return interceptor(ctx, in, info, handler)
  228. }
  229. // QueryService_ServiceDesc is the grpc.ServiceDesc for QueryService service.
  230. // It's only intended for direct use with grpc.RegisterService,
  231. // and not to be introspected or modified (even as a copy)
  232. var QueryService_ServiceDesc = grpc.ServiceDesc{
  233. ServiceName: "v1.QueryService",
  234. HandlerType: (*QueryServiceServer)(nil),
  235. Methods: []grpc.MethodDesc{
  236. {
  237. MethodName: "QueryByWhereAndOrderBy",
  238. Handler: _QueryService_QueryByWhereAndOrderBy_Handler,
  239. },
  240. {
  241. MethodName: "CommonQuery",
  242. Handler: _QueryService_CommonQuery_Handler,
  243. },
  244. {
  245. MethodName: "QueryByKeys",
  246. Handler: _QueryService_QueryByKeys_Handler,
  247. },
  248. {
  249. MethodName: "CommonQueryByKeys",
  250. Handler: _QueryService_CommonQueryByKeys_Handler,
  251. },
  252. {
  253. MethodName: "CountWhere",
  254. Handler: _QueryService_CountWhere_Handler,
  255. },
  256. {
  257. MethodName: "CommonCount",
  258. Handler: _QueryService_CommonCount_Handler,
  259. },
  260. },
  261. Streams: []grpc.StreamDesc{},
  262. Metadata: "v1/query.proto",
  263. }