userver: userver/storages/redis/mock_client_google.hpp Source File
Loading...
Searching...
No Matches
mock_client_google.hpp
1#pragma once
2
3#include <string>
4#include <vector>
5
6#include <gmock/gmock.h>
8
10
11USERVER_NAMESPACE_BEGIN
12
13namespace storages::redis {
14
15class GMockClient : public MockClientBase {
16public:
17 MOCK_METHOD(size_t, ShardsCount, (), (const, override));
18
19 MOCK_METHOD(size_t, ShardByKey, (const std::string& key), (const, override));
20
21 MOCK_METHOD(void, WaitConnectedOnce, (RedisWaitConnected wait_connected), (override));
22 MOCK_METHOD(bool, IsReady, (const HealthCheckParams& params), (const, override));
23
24 MOCK_METHOD(
25 RequestAppend,
26 Append,
27 (std::string key, std::string value, const CommandControl& command_control),
28 (override)
29 );
30
31 MOCK_METHOD(
32 RequestBitop,
33 Bitop,
34 (BitOperation op, std::string dest_key, std::vector<std::string> src_keys, const CommandControl& command_control
35 ),
36 (override)
37 );
38
39 MOCK_METHOD(RequestDbsize, Dbsize, (size_t shard, const CommandControl& command_control), (override));
40
41 MOCK_METHOD(RequestDecr, Decr, (std::string key, const CommandControl& command_control), (override));
42
43 MOCK_METHOD(RequestDel, Del, (std::string key, const CommandControl& command_control), (override));
44
45 MOCK_METHOD(RequestDel, Del, (std::vector<std::string> keys, const CommandControl& command_control), (override));
46
47 MOCK_METHOD(RequestUnlink, Unlink, (std::string key, const CommandControl& command_control), (override));
48
49 MOCK_METHOD(
50 RequestUnlink,
51 Unlink,
52 (std::vector<std::string> keys, const CommandControl& command_control),
53 (override)
54 );
55
56 MOCK_METHOD(RequestExists, Exists, (std::string key, const CommandControl& command_control), (override));
57
58 MOCK_METHOD(
59 RequestExists,
60 Exists,
61 (std::vector<std::string> keys, const CommandControl& command_control),
62 (override)
63 );
64
65 MOCK_METHOD(
66 RequestExpire,
67 Expire,
68 (std::string key, std::chrono::seconds ttl, const CommandControl& command_control),
69 (override)
70 );
71
72 MOCK_METHOD(RequestGet, Get, (std::string key, const CommandControl& command_control), (override));
73
74 MOCK_METHOD(RequestGetdel, Getdel, (std::string key, const CommandControl& command_control), (override));
75
76 MOCK_METHOD(
77 RequestGetset,
78 Getset,
79 (std::string key, std::string value, const CommandControl& command_control),
80 (override)
81 );
82
83 MOCK_METHOD(
84 RequestHdel,
85 Hdel,
86 (std::string key, std::string field, const CommandControl& command_control),
87 (override)
88 );
89
90 MOCK_METHOD(
91 RequestHdel,
92 Hdel,
93 (std::string key, std::vector<std::string> fields, const CommandControl& command_control),
94 (override)
95 );
96
97 MOCK_METHOD(
98 RequestHexists,
99 Hexists,
100 (std::string key, std::string field, const CommandControl& command_control),
101 (override)
102 );
103
104 MOCK_METHOD(
105 RequestHget,
106 Hget,
107 (std::string key, std::string field, const CommandControl& command_control),
108 (override)
109 );
110
111 MOCK_METHOD(RequestHgetall, Hgetall, (std::string key, const CommandControl& command_control), (override));
112
113 MOCK_METHOD(
114 RequestHincrby,
115 Hincrby,
116 (std::string key, std::string field, int64_t increment, const CommandControl& command_control),
117 (override)
118 );
119
120 MOCK_METHOD(
121 RequestHincrbyfloat,
122 Hincrbyfloat,
123 (std::string key, std::string field, double increment, const CommandControl& command_control),
124 (override)
125 );
126
127 MOCK_METHOD(RequestHkeys, Hkeys, (std::string key, const CommandControl& command_control), (override));
128
129 MOCK_METHOD(RequestHlen, Hlen, (std::string key, const CommandControl& command_control), (override));
130
131 MOCK_METHOD(
132 RequestHmget,
133 Hmget,
134 (std::string key, std::vector<std::string> fields, const CommandControl& command_control),
135 (override)
136 );
137
138 MOCK_METHOD(
139 RequestHmset,
140 Hmset,
141 (std::string key,
142 (std::vector<std::pair<std::string, std::string>>)field_values,
143 const CommandControl& command_control),
144 (override)
145 );
146
147 MOCK_METHOD(
148 RequestHscan,
149 Hscan,
150 (std::string key, HscanOptions options, const CommandControl& command_control),
151 (override)
152 );
153
154 MOCK_METHOD(
155 RequestHset,
156 Hset,
157 (std::string key, std::string field, std::string value, const CommandControl& command_control),
158 (override)
159 );
160
161 MOCK_METHOD(
162 RequestHsetnx,
163 Hsetnx,
164 (std::string key, std::string field, std::string value, const CommandControl& command_control),
165 (override)
166 );
167
168 MOCK_METHOD(RequestHvals, Hvals, (std::string key, const CommandControl& command_control), (override));
169
170 MOCK_METHOD(RequestIncr, Incr, (std::string key, const CommandControl& command_control), (override));
171
172 MOCK_METHOD(
173 RequestKeys,
174 Keys,
175 (std::string keys_pattern, size_t shard, const CommandControl& command_control),
176 (override)
177 );
178
179 MOCK_METHOD(
180 RequestLindex,
181 Lindex,
182 (std::string key, int64_t index, const CommandControl& command_control),
183 (override)
184 );
185
186 MOCK_METHOD(RequestLlen, Llen, (std::string key, const CommandControl& command_control), (override));
187
188 MOCK_METHOD(RequestLpop, Lpop, (std::string key, const CommandControl& command_control), (override));
189
190 MOCK_METHOD(
191 RequestLpush,
192 Lpush,
193 (std::string key, std::string value, const CommandControl& command_control),
194 (override)
195 );
196
197 MOCK_METHOD(
198 RequestLpush,
199 Lpush,
200 (std::string key, std::vector<std::string> values, const CommandControl& command_control),
201 (override)
202 );
203
204 MOCK_METHOD(
205 RequestLrange,
206 Lrange,
207 (std::string key, int64_t start, int64_t stop, const CommandControl& command_control),
208 (override)
209 );
210
211 MOCK_METHOD(
212 RequestLrem,
213 Lrem,
214 (std::string key, int64_t count, std::string element, const CommandControl& command_control),
215 (override)
216 );
217
218 MOCK_METHOD(
219 RequestLtrim,
220 Ltrim,
221 (std::string key, int64_t start, int64_t stop, const CommandControl& command_control),
222 (override)
223 );
224
225 MOCK_METHOD(RequestMget, Mget, (std::vector<std::string> keys, const CommandControl& command_control), (override));
226
227 MOCK_METHOD(
228 RequestMset,
229 Mset,
230 ((std::vector<std::pair<std::string, std::string>>)key_values, const CommandControl& command_control),
231 (override)
232 );
233
234 MOCK_METHOD(
235 RequestMsetex,
236 Msetex,
237 ((std::vector<std::pair<std::string, std::string>>)key_values, const CommandControl& command_control),
238 (override)
239 );
240
241 MOCK_METHOD(
242 RequestMsetex,
243 Msetex,
244 ((std::vector<std::pair<std::string, std::string>>)key_values,
245 MsetexOptions options,
246 const CommandControl& command_control),
247 (override)
248 );
249
250 MOCK_METHOD(RequestPersist, Persist, (std::string key, const CommandControl& command_control), (override));
251
252 MOCK_METHOD(
253 RequestPexpire,
254 Pexpire,
255 (std::string key, std::chrono::milliseconds ttl, const CommandControl& command_control),
256 (override)
257 );
258
259 MOCK_METHOD(RequestPing, Ping, (size_t shard, const CommandControl& command_control), (override));
260
261 MOCK_METHOD(
262 RequestPingMessage,
263 Ping,
264 (size_t shard, std::string message, const CommandControl& command_control),
265 (override)
266 );
267
268 MOCK_METHOD(
269 void,
270 Publish,
271 (std::string channel, std::string message, const CommandControl& command_control, PubShard policy),
272 (override)
273 );
274
275 MOCK_METHOD(
276 void,
277 Spublish,
278 (std::string channel, std::string message, const CommandControl& command_control),
279 (override)
280 );
281
282 MOCK_METHOD(
283 RequestRename,
284 Rename,
285 (std::string key, std::string new_key, const CommandControl& command_control),
286 (override)
287 );
288
289 MOCK_METHOD(RequestRpop, Rpop, (std::string key, const CommandControl& command_control), (override));
290
291 MOCK_METHOD(
292 RequestRpush,
293 Rpush,
294 (std::string key, std::string value, const CommandControl& command_control),
295 (override)
296 );
297
298 MOCK_METHOD(
299 RequestRpush,
300 Rpush,
301 (std::string key, std::vector<std::string> values, const CommandControl& command_control),
302 (override)
303 );
304
305 MOCK_METHOD(
306 RequestSadd,
307 Sadd,
308 (std::string key, std::string member, const CommandControl& command_control),
309 (override)
310 );
311
312 MOCK_METHOD(
313 RequestSadd,
314 Sadd,
315 (std::string key, std::vector<std::string> members, const CommandControl& command_control),
316 (override)
317 );
318
319 MOCK_METHOD(
320 RequestScan,
321 Scan,
322 (size_t shard, ScanOptions options, const CommandControl& command_control),
323 (override)
324 );
325
326 MOCK_METHOD(RequestScard, Scard, (std::string key, const CommandControl& command_control), (override));
327
328 MOCK_METHOD(
329 RequestSet,
330 Set,
331 (std::string key, std::string value, const CommandControl& command_control),
332 (override)
333 );
334
335 MOCK_METHOD(
336 RequestSet,
337 Set,
338 (std::string key, std::string value, std::chrono::milliseconds ttl, const CommandControl& command_control),
339 (override)
340 );
341
342 MOCK_METHOD(
343 RequestSetIfExist,
344 SetIfExist,
345 (std::string key, std::string value, const CommandControl& command_control),
346 (override)
347 );
348
349 MOCK_METHOD(
350 RequestSetIfExist,
351 SetIfExist,
352 (std::string key, std::string value, std::chrono::milliseconds ttl, const CommandControl& command_control),
353 (override)
354 );
355
356 MOCK_METHOD(
357 RequestSetIfNotExist,
358 SetIfNotExist,
359 (std::string key, std::string value, const CommandControl& command_control),
360 (override)
361 );
362
363 MOCK_METHOD(
364 RequestSetIfNotExist,
365 SetIfNotExist,
366 (std::string key, std::string value, std::chrono::milliseconds ttl, const CommandControl& command_control),
367 (override)
368 );
369
370 MOCK_METHOD(
371 RequestSetex,
372 Setex,
373 (std::string key, std::chrono::seconds seconds, std::string value, const CommandControl& command_control),
374 (override)
375 );
376
377 MOCK_METHOD(
378 RequestSismember,
379 Sismember,
380 (std::string key, std::string member, const CommandControl& command_control),
381 (override)
382 );
383
384 MOCK_METHOD(RequestSmembers, Smembers, (std::string key, const CommandControl& command_control), (override));
385
386 MOCK_METHOD(RequestSrandmember, Srandmember, (std::string key, const CommandControl& command_control), (override));
387
388 MOCK_METHOD(
389 RequestSrandmembers,
390 Srandmembers,
391 (std::string key, int64_t count, const CommandControl& command_control),
392 (override)
393 );
394
395 MOCK_METHOD(
396 RequestSrem,
397 Srem,
398 (std::string key, std::string member, const CommandControl& command_control),
399 (override)
400 );
401
402 MOCK_METHOD(
403 RequestSrem,
404 Srem,
405 (std::string key, std::vector<std::string> members, const CommandControl& command_control),
406 (override)
407 );
408
409 MOCK_METHOD(
410 RequestSscan,
411 Sscan,
412 (std::string key, SscanOptions options, const CommandControl& command_control),
413 (override)
414 );
415
416 MOCK_METHOD(RequestStrlen, Strlen, (std::string key, const CommandControl& command_control), (override));
417
418 MOCK_METHOD(RequestTtl, Ttl, (std::string key, const CommandControl& command_control), (override));
419
420 MOCK_METHOD(RequestType, Type, (std::string key, const CommandControl& command_control), (override));
421
422 MOCK_METHOD(
423 RequestZadd,
424 Zadd,
425 (std::string key, double score, std::string member, const CommandControl& command_control),
426 (override)
427 );
428
429 MOCK_METHOD(
430 RequestZadd,
431 Zadd,
432 (std::string key,
433 double score,
434 std::string member,
435 const ZaddOptions& options,
436 const CommandControl& command_control),
437 (override)
438 );
439
440 MOCK_METHOD(
441 RequestZaddIncr,
442 ZaddIncr,
443 (std::string key, double score, std::string member, const CommandControl& command_control),
444 (override)
445 );
446
447 MOCK_METHOD(
448 RequestZaddIncrExisting,
449 ZaddIncrExisting,
450 (std::string key, double score, std::string member, const CommandControl& command_control),
451 (override)
452 );
453
454 MOCK_METHOD(RequestZcard, Zcard, (std::string key, const CommandControl& command_control), (override));
455
456 MOCK_METHOD(
457 RequestZrangeWithScores,
458 ZrangeWithScores,
459 (std::string key, int64_t start, int64_t stop, const CommandControl& command_control),
460 (override)
461 );
462
463 MOCK_METHOD(
464 RequestZrangebyscore,
465 Zrangebyscore,
466 (std::string key, double min, double max, const CommandControl& command_control),
467 (override)
468 );
469
470 MOCK_METHOD(
471 RequestZrangebyscore,
472 Zrangebyscore,
473 (std::string key, std::string min, std::string max, const CommandControl& command_control),
474 (override)
475 );
476
477 MOCK_METHOD(
478 RequestZrangebyscore,
479 Zrangebyscore,
480 (std::string key,
481 double min,
482 double max,
483 const RangeOptions& range_options,
484 const CommandControl& command_control),
485 (override)
486 );
487
488 MOCK_METHOD(
489 RequestZrangebyscore,
490 Zrangebyscore,
491 (std::string key,
492 std::string min,
493 std::string max,
494 const RangeOptions& range_options,
495 const CommandControl& command_control),
496 (override)
497 );
498
499 MOCK_METHOD(
500 RequestZrangebyscoreWithScores,
501 ZrangebyscoreWithScores,
502 (std::string key, double min, double max, const CommandControl& command_control),
503 (override)
504 );
505
506 MOCK_METHOD(
507 RequestZrangebyscoreWithScores,
508 ZrangebyscoreWithScores,
509 (std::string key, std::string min, std::string max, const CommandControl& command_control),
510 (override)
511 );
512
513 MOCK_METHOD(
514 RequestZrangebyscoreWithScores,
515 ZrangebyscoreWithScores,
516 (std::string key,
517 double min,
518 double max,
519 const RangeOptions& range_options,
520 const CommandControl& command_control),
521 (override)
522 );
523
524 MOCK_METHOD(
525 RequestZrangebyscoreWithScores,
526 ZrangebyscoreWithScores,
527 (std::string key,
528 std::string min,
529 std::string max,
530 const RangeOptions& range_options,
531 const CommandControl& command_control),
532 (override)
533 );
534
535 MOCK_METHOD(
536 RequestZrem,
537 Zrem,
538 (std::string key, std::string member, const CommandControl& command_control),
539 (override)
540 );
541
542 MOCK_METHOD(
543 RequestZrem,
544 Zrem,
545 (std::string key, std::vector<std::string> members, const CommandControl& command_control),
546 (override)
547 );
548
549 MOCK_METHOD(
550 RequestZscan,
551 Zscan,
552 (std::string key, ZscanOptions options, const CommandControl& command_control),
553 (override)
554 );
555
556 MOCK_METHOD(
557 RequestZscore,
558 Zscore,
559 (std::string key, std::string member, const CommandControl& command_control),
560 (override)
561 );
562
563 MOCK_METHOD(
564 RequestEvalCommon,
565 EvalCommon,
566 (std::string script,
567 std::vector<std::string> keys,
568 std::vector<std::string> args,
569 const CommandControl& command_control),
570 (override)
571 );
572
573 MOCK_METHOD(
574 RequestEvalShaCommon,
575 EvalShaCommon,
576 (std::string script,
577 std::vector<std::string> keys,
578 std::vector<std::string> args,
579 const CommandControl& command_control),
580 (override)
581 );
582
583 MOCK_METHOD(
584 RequestGeosearch,
585 Geosearch,
586 (std::string key,
587 std::string member,
588 double radius,
589 const GeosearchOptions& geosearch_options,
590 const CommandControl& command_control),
591 (override)
592 );
593 MOCK_METHOD(
594 RequestGeosearch,
595 Geosearch,
596 (std::string key,
597 std::string member,
598 BoxWidth width,
599 BoxHeight height,
600 const GeosearchOptions& geosearch_options,
601 const CommandControl& command_control),
602 (override)
603 );
604 MOCK_METHOD(
605 RequestGeosearch,
606 Geosearch,
607 (std::string key,
608 Longitude lon,
609 Latitude lat,
610 double radius,
611 const GeosearchOptions& geosearch_options,
612 const CommandControl& command_control),
613 (override)
614 );
615 MOCK_METHOD(
616 RequestGeosearch,
617 Geosearch,
618 (std::string key,
619 Longitude lon,
620 Latitude lat,
621 BoxWidth width,
622 BoxHeight height,
623 const GeosearchOptions& geosearch_options,
624 const CommandControl& command_control),
625 (override)
626 );
627};
628
629} // namespace storages::redis
630
631USERVER_NAMESPACE_END