github.com/badrootd/nibiru-cometbft@v0.37.5-0.20240307173500-2a75559eee9b/rpc/client/mocks/client.go (about) 1 // Code generated by mockery 2.7.4. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 bytes "github.com/badrootd/nibiru-cometbft/libs/bytes" 7 client "github.com/badrootd/nibiru-cometbft/rpc/client" 8 9 context "context" 10 11 coretypes "github.com/badrootd/nibiru-cometbft/rpc/core/types" 12 13 log "github.com/badrootd/nibiru-cometbft/libs/log" 14 15 mock "github.com/stretchr/testify/mock" 16 17 types "github.com/badrootd/nibiru-cometbft/types" 18 ) 19 20 // Client is an autogenerated mock type for the Client type 21 type Client struct { 22 mock.Mock 23 } 24 25 // ABCIInfo provides a mock function with given fields: _a0 26 func (_m *Client) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo, error) { 27 ret := _m.Called(_a0) 28 29 var r0 *coretypes.ResultABCIInfo 30 if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultABCIInfo); ok { 31 r0 = rf(_a0) 32 } else { 33 if ret.Get(0) != nil { 34 r0 = ret.Get(0).(*coretypes.ResultABCIInfo) 35 } 36 } 37 38 var r1 error 39 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 40 r1 = rf(_a0) 41 } else { 42 r1 = ret.Error(1) 43 } 44 45 return r0, r1 46 } 47 48 // ABCIQuery provides a mock function with given fields: ctx, path, data 49 func (_m *Client) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error) { 50 ret := _m.Called(ctx, path, data) 51 52 var r0 *coretypes.ResultABCIQuery 53 if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes) *coretypes.ResultABCIQuery); ok { 54 r0 = rf(ctx, path, data) 55 } else { 56 if ret.Get(0) != nil { 57 r0 = ret.Get(0).(*coretypes.ResultABCIQuery) 58 } 59 } 60 61 var r1 error 62 if rf, ok := ret.Get(1).(func(context.Context, string, bytes.HexBytes) error); ok { 63 r1 = rf(ctx, path, data) 64 } else { 65 r1 = ret.Error(1) 66 } 67 68 return r0, r1 69 } 70 71 // ABCIQueryWithOptions provides a mock function with given fields: ctx, path, data, opts 72 func (_m *Client) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, opts client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error) { 73 ret := _m.Called(ctx, path, data, opts) 74 75 var r0 *coretypes.ResultABCIQuery 76 if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes, client.ABCIQueryOptions) *coretypes.ResultABCIQuery); ok { 77 r0 = rf(ctx, path, data, opts) 78 } else { 79 if ret.Get(0) != nil { 80 r0 = ret.Get(0).(*coretypes.ResultABCIQuery) 81 } 82 } 83 84 var r1 error 85 if rf, ok := ret.Get(1).(func(context.Context, string, bytes.HexBytes, client.ABCIQueryOptions) error); ok { 86 r1 = rf(ctx, path, data, opts) 87 } else { 88 r1 = ret.Error(1) 89 } 90 91 return r0, r1 92 } 93 94 // Block provides a mock function with given fields: ctx, height 95 func (_m *Client) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error) { 96 ret := _m.Called(ctx, height) 97 98 var r0 *coretypes.ResultBlock 99 if rf, ok := ret.Get(0).(func(context.Context, *int64) *coretypes.ResultBlock); ok { 100 r0 = rf(ctx, height) 101 } else { 102 if ret.Get(0) != nil { 103 r0 = ret.Get(0).(*coretypes.ResultBlock) 104 } 105 } 106 107 var r1 error 108 if rf, ok := ret.Get(1).(func(context.Context, *int64) error); ok { 109 r1 = rf(ctx, height) 110 } else { 111 r1 = ret.Error(1) 112 } 113 114 return r0, r1 115 } 116 117 // BlockByHash provides a mock function with given fields: ctx, hash 118 func (_m *Client) BlockByHash(ctx context.Context, hash []byte) (*coretypes.ResultBlock, error) { 119 ret := _m.Called(ctx, hash) 120 121 var r0 *coretypes.ResultBlock 122 if rf, ok := ret.Get(0).(func(context.Context, []byte) *coretypes.ResultBlock); ok { 123 r0 = rf(ctx, hash) 124 } else { 125 if ret.Get(0) != nil { 126 r0 = ret.Get(0).(*coretypes.ResultBlock) 127 } 128 } 129 130 var r1 error 131 if rf, ok := ret.Get(1).(func(context.Context, []byte) error); ok { 132 r1 = rf(ctx, hash) 133 } else { 134 r1 = ret.Error(1) 135 } 136 137 return r0, r1 138 } 139 140 // BlockResults provides a mock function with given fields: ctx, height 141 func (_m *Client) BlockResults(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error) { 142 ret := _m.Called(ctx, height) 143 144 var r0 *coretypes.ResultBlockResults 145 if rf, ok := ret.Get(0).(func(context.Context, *int64) *coretypes.ResultBlockResults); ok { 146 r0 = rf(ctx, height) 147 } else { 148 if ret.Get(0) != nil { 149 r0 = ret.Get(0).(*coretypes.ResultBlockResults) 150 } 151 } 152 153 var r1 error 154 if rf, ok := ret.Get(1).(func(context.Context, *int64) error); ok { 155 r1 = rf(ctx, height) 156 } else { 157 r1 = ret.Error(1) 158 } 159 160 return r0, r1 161 } 162 163 // BlockSearch provides a mock function with given fields: ctx, query, page, perPage, orderBy 164 func (_m *Client) BlockSearch(ctx context.Context, query string, page *int, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error) { 165 ret := _m.Called(ctx, query, page, perPage, orderBy) 166 167 var r0 *coretypes.ResultBlockSearch 168 if rf, ok := ret.Get(0).(func(context.Context, string, *int, *int, string) *coretypes.ResultBlockSearch); ok { 169 r0 = rf(ctx, query, page, perPage, orderBy) 170 } else { 171 if ret.Get(0) != nil { 172 r0 = ret.Get(0).(*coretypes.ResultBlockSearch) 173 } 174 } 175 176 var r1 error 177 if rf, ok := ret.Get(1).(func(context.Context, string, *int, *int, string) error); ok { 178 r1 = rf(ctx, query, page, perPage, orderBy) 179 } else { 180 r1 = ret.Error(1) 181 } 182 183 return r0, r1 184 } 185 186 // BlockchainInfo provides a mock function with given fields: ctx, minHeight, maxHeight 187 func (_m *Client) BlockchainInfo(ctx context.Context, minHeight int64, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) { 188 ret := _m.Called(ctx, minHeight, maxHeight) 189 190 var r0 *coretypes.ResultBlockchainInfo 191 if rf, ok := ret.Get(0).(func(context.Context, int64, int64) *coretypes.ResultBlockchainInfo); ok { 192 r0 = rf(ctx, minHeight, maxHeight) 193 } else { 194 if ret.Get(0) != nil { 195 r0 = ret.Get(0).(*coretypes.ResultBlockchainInfo) 196 } 197 } 198 199 var r1 error 200 if rf, ok := ret.Get(1).(func(context.Context, int64, int64) error); ok { 201 r1 = rf(ctx, minHeight, maxHeight) 202 } else { 203 r1 = ret.Error(1) 204 } 205 206 return r0, r1 207 } 208 209 // BroadcastEvidence provides a mock function with given fields: _a0, _a1 210 func (_m *Client) BroadcastEvidence(_a0 context.Context, _a1 types.Evidence) (*coretypes.ResultBroadcastEvidence, error) { 211 ret := _m.Called(_a0, _a1) 212 213 var r0 *coretypes.ResultBroadcastEvidence 214 if rf, ok := ret.Get(0).(func(context.Context, types.Evidence) *coretypes.ResultBroadcastEvidence); ok { 215 r0 = rf(_a0, _a1) 216 } else { 217 if ret.Get(0) != nil { 218 r0 = ret.Get(0).(*coretypes.ResultBroadcastEvidence) 219 } 220 } 221 222 var r1 error 223 if rf, ok := ret.Get(1).(func(context.Context, types.Evidence) error); ok { 224 r1 = rf(_a0, _a1) 225 } else { 226 r1 = ret.Error(1) 227 } 228 229 return r0, r1 230 } 231 232 // BroadcastTxAsync provides a mock function with given fields: _a0, _a1 233 func (_m *Client) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { 234 ret := _m.Called(_a0, _a1) 235 236 var r0 *coretypes.ResultBroadcastTx 237 if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultBroadcastTx); ok { 238 r0 = rf(_a0, _a1) 239 } else { 240 if ret.Get(0) != nil { 241 r0 = ret.Get(0).(*coretypes.ResultBroadcastTx) 242 } 243 } 244 245 var r1 error 246 if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { 247 r1 = rf(_a0, _a1) 248 } else { 249 r1 = ret.Error(1) 250 } 251 252 return r0, r1 253 } 254 255 // BroadcastTxCommit provides a mock function with given fields: _a0, _a1 256 func (_m *Client) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTxCommit, error) { 257 ret := _m.Called(_a0, _a1) 258 259 var r0 *coretypes.ResultBroadcastTxCommit 260 if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultBroadcastTxCommit); ok { 261 r0 = rf(_a0, _a1) 262 } else { 263 if ret.Get(0) != nil { 264 r0 = ret.Get(0).(*coretypes.ResultBroadcastTxCommit) 265 } 266 } 267 268 var r1 error 269 if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { 270 r1 = rf(_a0, _a1) 271 } else { 272 r1 = ret.Error(1) 273 } 274 275 return r0, r1 276 } 277 278 // BroadcastTxSync provides a mock function with given fields: _a0, _a1 279 func (_m *Client) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { 280 ret := _m.Called(_a0, _a1) 281 282 var r0 *coretypes.ResultBroadcastTx 283 if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultBroadcastTx); ok { 284 r0 = rf(_a0, _a1) 285 } else { 286 if ret.Get(0) != nil { 287 r0 = ret.Get(0).(*coretypes.ResultBroadcastTx) 288 } 289 } 290 291 var r1 error 292 if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { 293 r1 = rf(_a0, _a1) 294 } else { 295 r1 = ret.Error(1) 296 } 297 298 return r0, r1 299 } 300 301 // CheckTx provides a mock function with given fields: _a0, _a1 302 func (_m *Client) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultCheckTx, error) { 303 ret := _m.Called(_a0, _a1) 304 305 var r0 *coretypes.ResultCheckTx 306 if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultCheckTx); ok { 307 r0 = rf(_a0, _a1) 308 } else { 309 if ret.Get(0) != nil { 310 r0 = ret.Get(0).(*coretypes.ResultCheckTx) 311 } 312 } 313 314 var r1 error 315 if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { 316 r1 = rf(_a0, _a1) 317 } else { 318 r1 = ret.Error(1) 319 } 320 321 return r0, r1 322 } 323 324 // Commit provides a mock function with given fields: ctx, height 325 func (_m *Client) Commit(ctx context.Context, height *int64) (*coretypes.ResultCommit, error) { 326 ret := _m.Called(ctx, height) 327 328 var r0 *coretypes.ResultCommit 329 if rf, ok := ret.Get(0).(func(context.Context, *int64) *coretypes.ResultCommit); ok { 330 r0 = rf(ctx, height) 331 } else { 332 if ret.Get(0) != nil { 333 r0 = ret.Get(0).(*coretypes.ResultCommit) 334 } 335 } 336 337 var r1 error 338 if rf, ok := ret.Get(1).(func(context.Context, *int64) error); ok { 339 r1 = rf(ctx, height) 340 } else { 341 r1 = ret.Error(1) 342 } 343 344 return r0, r1 345 } 346 347 // ConsensusParams provides a mock function with given fields: ctx, height 348 func (_m *Client) ConsensusParams(ctx context.Context, height *int64) (*coretypes.ResultConsensusParams, error) { 349 ret := _m.Called(ctx, height) 350 351 var r0 *coretypes.ResultConsensusParams 352 if rf, ok := ret.Get(0).(func(context.Context, *int64) *coretypes.ResultConsensusParams); ok { 353 r0 = rf(ctx, height) 354 } else { 355 if ret.Get(0) != nil { 356 r0 = ret.Get(0).(*coretypes.ResultConsensusParams) 357 } 358 } 359 360 var r1 error 361 if rf, ok := ret.Get(1).(func(context.Context, *int64) error); ok { 362 r1 = rf(ctx, height) 363 } else { 364 r1 = ret.Error(1) 365 } 366 367 return r0, r1 368 } 369 370 // ConsensusState provides a mock function with given fields: _a0 371 func (_m *Client) ConsensusState(_a0 context.Context) (*coretypes.ResultConsensusState, error) { 372 ret := _m.Called(_a0) 373 374 var r0 *coretypes.ResultConsensusState 375 if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultConsensusState); ok { 376 r0 = rf(_a0) 377 } else { 378 if ret.Get(0) != nil { 379 r0 = ret.Get(0).(*coretypes.ResultConsensusState) 380 } 381 } 382 383 var r1 error 384 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 385 r1 = rf(_a0) 386 } else { 387 r1 = ret.Error(1) 388 } 389 390 return r0, r1 391 } 392 393 // DumpConsensusState provides a mock function with given fields: _a0 394 func (_m *Client) DumpConsensusState(_a0 context.Context) (*coretypes.ResultDumpConsensusState, error) { 395 ret := _m.Called(_a0) 396 397 var r0 *coretypes.ResultDumpConsensusState 398 if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultDumpConsensusState); ok { 399 r0 = rf(_a0) 400 } else { 401 if ret.Get(0) != nil { 402 r0 = ret.Get(0).(*coretypes.ResultDumpConsensusState) 403 } 404 } 405 406 var r1 error 407 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 408 r1 = rf(_a0) 409 } else { 410 r1 = ret.Error(1) 411 } 412 413 return r0, r1 414 } 415 416 // Genesis provides a mock function with given fields: _a0 417 func (_m *Client) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, error) { 418 ret := _m.Called(_a0) 419 420 var r0 *coretypes.ResultGenesis 421 if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultGenesis); ok { 422 r0 = rf(_a0) 423 } else { 424 if ret.Get(0) != nil { 425 r0 = ret.Get(0).(*coretypes.ResultGenesis) 426 } 427 } 428 429 var r1 error 430 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 431 r1 = rf(_a0) 432 } else { 433 r1 = ret.Error(1) 434 } 435 436 return r0, r1 437 } 438 439 // GenesisChunked provides a mock function with given fields: _a0, _a1 440 func (_m *Client) GenesisChunked(_a0 context.Context, _a1 uint) (*coretypes.ResultGenesisChunk, error) { 441 ret := _m.Called(_a0, _a1) 442 443 var r0 *coretypes.ResultGenesisChunk 444 if rf, ok := ret.Get(0).(func(context.Context, uint) *coretypes.ResultGenesisChunk); ok { 445 r0 = rf(_a0, _a1) 446 } else { 447 if ret.Get(0) != nil { 448 r0 = ret.Get(0).(*coretypes.ResultGenesisChunk) 449 } 450 } 451 452 var r1 error 453 if rf, ok := ret.Get(1).(func(context.Context, uint) error); ok { 454 r1 = rf(_a0, _a1) 455 } else { 456 r1 = ret.Error(1) 457 } 458 459 return r0, r1 460 } 461 462 // Header provides a mock function with given fields: ctx, height 463 func (_m *Client) Header(ctx context.Context, height *int64) (*coretypes.ResultHeader, error) { 464 ret := _m.Called(ctx, height) 465 466 var r0 *coretypes.ResultHeader 467 if rf, ok := ret.Get(0).(func(context.Context, *int64) *coretypes.ResultHeader); ok { 468 r0 = rf(ctx, height) 469 } else { 470 if ret.Get(0) != nil { 471 r0 = ret.Get(0).(*coretypes.ResultHeader) 472 } 473 } 474 475 var r1 error 476 if rf, ok := ret.Get(1).(func(context.Context, *int64) error); ok { 477 r1 = rf(ctx, height) 478 } else { 479 r1 = ret.Error(1) 480 } 481 482 return r0, r1 483 } 484 485 // HeaderByHash provides a mock function with given fields: ctx, hash 486 func (_m *Client) HeaderByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultHeader, error) { 487 ret := _m.Called(ctx, hash) 488 489 var r0 *coretypes.ResultHeader 490 if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) *coretypes.ResultHeader); ok { 491 r0 = rf(ctx, hash) 492 } else { 493 if ret.Get(0) != nil { 494 r0 = ret.Get(0).(*coretypes.ResultHeader) 495 } 496 } 497 498 var r1 error 499 if rf, ok := ret.Get(1).(func(context.Context, bytes.HexBytes) error); ok { 500 r1 = rf(ctx, hash) 501 } else { 502 r1 = ret.Error(1) 503 } 504 505 return r0, r1 506 } 507 508 // Health provides a mock function with given fields: _a0 509 func (_m *Client) Health(_a0 context.Context) (*coretypes.ResultHealth, error) { 510 ret := _m.Called(_a0) 511 512 var r0 *coretypes.ResultHealth 513 if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultHealth); ok { 514 r0 = rf(_a0) 515 } else { 516 if ret.Get(0) != nil { 517 r0 = ret.Get(0).(*coretypes.ResultHealth) 518 } 519 } 520 521 var r1 error 522 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 523 r1 = rf(_a0) 524 } else { 525 r1 = ret.Error(1) 526 } 527 528 return r0, r1 529 } 530 531 // IsRunning provides a mock function with given fields: 532 func (_m *Client) IsRunning() bool { 533 ret := _m.Called() 534 535 var r0 bool 536 if rf, ok := ret.Get(0).(func() bool); ok { 537 r0 = rf() 538 } else { 539 r0 = ret.Get(0).(bool) 540 } 541 542 return r0 543 } 544 545 // NetInfo provides a mock function with given fields: _a0 546 func (_m *Client) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, error) { 547 ret := _m.Called(_a0) 548 549 var r0 *coretypes.ResultNetInfo 550 if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultNetInfo); ok { 551 r0 = rf(_a0) 552 } else { 553 if ret.Get(0) != nil { 554 r0 = ret.Get(0).(*coretypes.ResultNetInfo) 555 } 556 } 557 558 var r1 error 559 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 560 r1 = rf(_a0) 561 } else { 562 r1 = ret.Error(1) 563 } 564 565 return r0, r1 566 } 567 568 // NumUnconfirmedTxs provides a mock function with given fields: _a0 569 func (_m *Client) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.ResultUnconfirmedTxs, error) { 570 ret := _m.Called(_a0) 571 572 var r0 *coretypes.ResultUnconfirmedTxs 573 if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultUnconfirmedTxs); ok { 574 r0 = rf(_a0) 575 } else { 576 if ret.Get(0) != nil { 577 r0 = ret.Get(0).(*coretypes.ResultUnconfirmedTxs) 578 } 579 } 580 581 var r1 error 582 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 583 r1 = rf(_a0) 584 } else { 585 r1 = ret.Error(1) 586 } 587 588 return r0, r1 589 } 590 591 // OnReset provides a mock function with given fields: 592 func (_m *Client) OnReset() error { 593 ret := _m.Called() 594 595 var r0 error 596 if rf, ok := ret.Get(0).(func() error); ok { 597 r0 = rf() 598 } else { 599 r0 = ret.Error(0) 600 } 601 602 return r0 603 } 604 605 // OnStart provides a mock function with given fields: 606 func (_m *Client) OnStart() error { 607 ret := _m.Called() 608 609 var r0 error 610 if rf, ok := ret.Get(0).(func() error); ok { 611 r0 = rf() 612 } else { 613 r0 = ret.Error(0) 614 } 615 616 return r0 617 } 618 619 // OnStop provides a mock function with given fields: 620 func (_m *Client) OnStop() { 621 _m.Called() 622 } 623 624 // Quit provides a mock function with given fields: 625 func (_m *Client) Quit() <-chan struct{} { 626 ret := _m.Called() 627 628 var r0 <-chan struct{} 629 if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { 630 r0 = rf() 631 } else { 632 if ret.Get(0) != nil { 633 r0 = ret.Get(0).(<-chan struct{}) 634 } 635 } 636 637 return r0 638 } 639 640 // Reset provides a mock function with given fields: 641 func (_m *Client) Reset() error { 642 ret := _m.Called() 643 644 var r0 error 645 if rf, ok := ret.Get(0).(func() error); ok { 646 r0 = rf() 647 } else { 648 r0 = ret.Error(0) 649 } 650 651 return r0 652 } 653 654 // SetLogger provides a mock function with given fields: _a0 655 func (_m *Client) SetLogger(_a0 log.Logger) { 656 _m.Called(_a0) 657 } 658 659 // Start provides a mock function with given fields: 660 func (_m *Client) Start() error { 661 ret := _m.Called() 662 663 var r0 error 664 if rf, ok := ret.Get(0).(func() error); ok { 665 r0 = rf() 666 } else { 667 r0 = ret.Error(0) 668 } 669 670 return r0 671 } 672 673 // Status provides a mock function with given fields: _a0 674 func (_m *Client) Status(_a0 context.Context) (*coretypes.ResultStatus, error) { 675 ret := _m.Called(_a0) 676 677 var r0 *coretypes.ResultStatus 678 if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultStatus); ok { 679 r0 = rf(_a0) 680 } else { 681 if ret.Get(0) != nil { 682 r0 = ret.Get(0).(*coretypes.ResultStatus) 683 } 684 } 685 686 var r1 error 687 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 688 r1 = rf(_a0) 689 } else { 690 r1 = ret.Error(1) 691 } 692 693 return r0, r1 694 } 695 696 // Stop provides a mock function with given fields: 697 func (_m *Client) Stop() error { 698 ret := _m.Called() 699 700 var r0 error 701 if rf, ok := ret.Get(0).(func() error); ok { 702 r0 = rf() 703 } else { 704 r0 = ret.Error(0) 705 } 706 707 return r0 708 } 709 710 // String provides a mock function with given fields: 711 func (_m *Client) String() string { 712 ret := _m.Called() 713 714 var r0 string 715 if rf, ok := ret.Get(0).(func() string); ok { 716 r0 = rf() 717 } else { 718 r0 = ret.Get(0).(string) 719 } 720 721 return r0 722 } 723 724 // Subscribe provides a mock function with given fields: ctx, subscriber, query, outCapacity 725 func (_m *Client) Subscribe(ctx context.Context, subscriber string, query string, outCapacity ...int) (<-chan coretypes.ResultEvent, error) { 726 _va := make([]interface{}, len(outCapacity)) 727 for _i := range outCapacity { 728 _va[_i] = outCapacity[_i] 729 } 730 var _ca []interface{} 731 _ca = append(_ca, ctx, subscriber, query) 732 _ca = append(_ca, _va...) 733 ret := _m.Called(_ca...) 734 735 var r0 <-chan coretypes.ResultEvent 736 if rf, ok := ret.Get(0).(func(context.Context, string, string, ...int) <-chan coretypes.ResultEvent); ok { 737 r0 = rf(ctx, subscriber, query, outCapacity...) 738 } else { 739 if ret.Get(0) != nil { 740 r0 = ret.Get(0).(<-chan coretypes.ResultEvent) 741 } 742 } 743 744 var r1 error 745 if rf, ok := ret.Get(1).(func(context.Context, string, string, ...int) error); ok { 746 r1 = rf(ctx, subscriber, query, outCapacity...) 747 } else { 748 r1 = ret.Error(1) 749 } 750 751 return r0, r1 752 } 753 754 // Tx provides a mock function with given fields: ctx, hash, prove 755 func (_m *Client) Tx(ctx context.Context, hash []byte, prove bool) (*coretypes.ResultTx, error) { 756 ret := _m.Called(ctx, hash, prove) 757 758 var r0 *coretypes.ResultTx 759 if rf, ok := ret.Get(0).(func(context.Context, []byte, bool) *coretypes.ResultTx); ok { 760 r0 = rf(ctx, hash, prove) 761 } else { 762 if ret.Get(0) != nil { 763 r0 = ret.Get(0).(*coretypes.ResultTx) 764 } 765 } 766 767 var r1 error 768 if rf, ok := ret.Get(1).(func(context.Context, []byte, bool) error); ok { 769 r1 = rf(ctx, hash, prove) 770 } else { 771 r1 = ret.Error(1) 772 } 773 774 return r0, r1 775 } 776 777 // TxSearch provides a mock function with given fields: ctx, query, prove, page, perPage, orderBy 778 func (_m *Client) TxSearch(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string) (*coretypes.ResultTxSearch, error) { 779 ret := _m.Called(ctx, query, prove, page, perPage, orderBy) 780 781 var r0 *coretypes.ResultTxSearch 782 if rf, ok := ret.Get(0).(func(context.Context, string, bool, *int, *int, string) *coretypes.ResultTxSearch); ok { 783 r0 = rf(ctx, query, prove, page, perPage, orderBy) 784 } else { 785 if ret.Get(0) != nil { 786 r0 = ret.Get(0).(*coretypes.ResultTxSearch) 787 } 788 } 789 790 var r1 error 791 if rf, ok := ret.Get(1).(func(context.Context, string, bool, *int, *int, string) error); ok { 792 r1 = rf(ctx, query, prove, page, perPage, orderBy) 793 } else { 794 r1 = ret.Error(1) 795 } 796 797 return r0, r1 798 } 799 800 // UnconfirmedTxs provides a mock function with given fields: ctx, limit 801 func (_m *Client) UnconfirmedTxs(ctx context.Context, limit *int) (*coretypes.ResultUnconfirmedTxs, error) { 802 ret := _m.Called(ctx, limit) 803 804 var r0 *coretypes.ResultUnconfirmedTxs 805 if rf, ok := ret.Get(0).(func(context.Context, *int) *coretypes.ResultUnconfirmedTxs); ok { 806 r0 = rf(ctx, limit) 807 } else { 808 if ret.Get(0) != nil { 809 r0 = ret.Get(0).(*coretypes.ResultUnconfirmedTxs) 810 } 811 } 812 813 var r1 error 814 if rf, ok := ret.Get(1).(func(context.Context, *int) error); ok { 815 r1 = rf(ctx, limit) 816 } else { 817 r1 = ret.Error(1) 818 } 819 820 return r0, r1 821 } 822 823 // Unsubscribe provides a mock function with given fields: ctx, subscriber, query 824 func (_m *Client) Unsubscribe(ctx context.Context, subscriber string, query string) error { 825 ret := _m.Called(ctx, subscriber, query) 826 827 var r0 error 828 if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { 829 r0 = rf(ctx, subscriber, query) 830 } else { 831 r0 = ret.Error(0) 832 } 833 834 return r0 835 } 836 837 // UnsubscribeAll provides a mock function with given fields: ctx, subscriber 838 func (_m *Client) UnsubscribeAll(ctx context.Context, subscriber string) error { 839 ret := _m.Called(ctx, subscriber) 840 841 var r0 error 842 if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { 843 r0 = rf(ctx, subscriber) 844 } else { 845 r0 = ret.Error(0) 846 } 847 848 return r0 849 } 850 851 // Validators provides a mock function with given fields: ctx, height, page, perPage 852 func (_m *Client) Validators(ctx context.Context, height *int64, page *int, perPage *int) (*coretypes.ResultValidators, error) { 853 ret := _m.Called(ctx, height, page, perPage) 854 855 var r0 *coretypes.ResultValidators 856 if rf, ok := ret.Get(0).(func(context.Context, *int64, *int, *int) *coretypes.ResultValidators); ok { 857 r0 = rf(ctx, height, page, perPage) 858 } else { 859 if ret.Get(0) != nil { 860 r0 = ret.Get(0).(*coretypes.ResultValidators) 861 } 862 } 863 864 var r1 error 865 if rf, ok := ret.Get(1).(func(context.Context, *int64, *int, *int) error); ok { 866 r1 = rf(ctx, height, page, perPage) 867 } else { 868 r1 = ret.Error(1) 869 } 870 871 return r0, r1 872 }