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