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