github.com/Finschia/ostracon@v1.1.5/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/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 // 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 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 *Client) 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 *Client) 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 *Client) 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 *Client) 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 *Client) 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 *Client) 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 *Client) 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 *Client) 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 *Client) 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 *Client) 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 *Client) 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 *Client) 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 *Client) 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 *Client) 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 *Client) 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 *Client) 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 *Client) 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 *Client) 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 *Client) 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 *Client) 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 *Client) 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 *Client) 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 *Client) 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 *Client) 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 *Client) OnStop() { 641 _m.Called() 642 } 643 644 // Quit provides a mock function with given fields: 645 func (_m *Client) 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 // Reset provides a mock function with given fields: 661 func (_m *Client) Reset() error { 662 ret := _m.Called() 663 664 var r0 error 665 if rf, ok := ret.Get(0).(func() error); ok { 666 r0 = rf() 667 } else { 668 r0 = ret.Error(0) 669 } 670 671 return r0 672 } 673 674 // SetLogger provides a mock function with given fields: _a0 675 func (_m *Client) SetLogger(_a0 log.Logger) { 676 _m.Called(_a0) 677 } 678 679 // Start provides a mock function with given fields: 680 func (_m *Client) Start() error { 681 ret := _m.Called() 682 683 var r0 error 684 if rf, ok := ret.Get(0).(func() error); ok { 685 r0 = rf() 686 } else { 687 r0 = ret.Error(0) 688 } 689 690 return r0 691 } 692 693 // Status provides a mock function with given fields: _a0 694 func (_m *Client) Status(_a0 context.Context) (*coretypes.ResultStatus, error) { 695 ret := _m.Called(_a0) 696 697 var r0 *coretypes.ResultStatus 698 var r1 error 699 if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultStatus, error)); ok { 700 return rf(_a0) 701 } 702 if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultStatus); ok { 703 r0 = rf(_a0) 704 } else { 705 if ret.Get(0) != nil { 706 r0 = ret.Get(0).(*coretypes.ResultStatus) 707 } 708 } 709 710 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 711 r1 = rf(_a0) 712 } else { 713 r1 = ret.Error(1) 714 } 715 716 return r0, r1 717 } 718 719 // Stop provides a mock function with given fields: 720 func (_m *Client) Stop() error { 721 ret := _m.Called() 722 723 var r0 error 724 if rf, ok := ret.Get(0).(func() error); ok { 725 r0 = rf() 726 } else { 727 r0 = ret.Error(0) 728 } 729 730 return r0 731 } 732 733 // String provides a mock function with given fields: 734 func (_m *Client) String() string { 735 ret := _m.Called() 736 737 var r0 string 738 if rf, ok := ret.Get(0).(func() string); ok { 739 r0 = rf() 740 } else { 741 r0 = ret.Get(0).(string) 742 } 743 744 return r0 745 } 746 747 // Subscribe provides a mock function with given fields: ctx, subscriber, query, outCapacity 748 func (_m *Client) Subscribe(ctx context.Context, subscriber string, query string, outCapacity ...int) (<-chan coretypes.ResultEvent, error) { 749 _va := make([]interface{}, len(outCapacity)) 750 for _i := range outCapacity { 751 _va[_i] = outCapacity[_i] 752 } 753 var _ca []interface{} 754 _ca = append(_ca, ctx, subscriber, query) 755 _ca = append(_ca, _va...) 756 ret := _m.Called(_ca...) 757 758 var r0 <-chan coretypes.ResultEvent 759 var r1 error 760 if rf, ok := ret.Get(0).(func(context.Context, string, string, ...int) (<-chan coretypes.ResultEvent, error)); ok { 761 return rf(ctx, subscriber, query, outCapacity...) 762 } 763 if rf, ok := ret.Get(0).(func(context.Context, string, string, ...int) <-chan coretypes.ResultEvent); ok { 764 r0 = rf(ctx, subscriber, query, outCapacity...) 765 } else { 766 if ret.Get(0) != nil { 767 r0 = ret.Get(0).(<-chan coretypes.ResultEvent) 768 } 769 } 770 771 if rf, ok := ret.Get(1).(func(context.Context, string, string, ...int) error); ok { 772 r1 = rf(ctx, subscriber, query, outCapacity...) 773 } else { 774 r1 = ret.Error(1) 775 } 776 777 return r0, r1 778 } 779 780 // Tx provides a mock function with given fields: ctx, hash, prove 781 func (_m *Client) Tx(ctx context.Context, hash []byte, prove bool) (*coretypes.ResultTx, error) { 782 ret := _m.Called(ctx, hash, prove) 783 784 var r0 *coretypes.ResultTx 785 var r1 error 786 if rf, ok := ret.Get(0).(func(context.Context, []byte, bool) (*coretypes.ResultTx, error)); ok { 787 return rf(ctx, hash, prove) 788 } 789 if rf, ok := ret.Get(0).(func(context.Context, []byte, bool) *coretypes.ResultTx); ok { 790 r0 = rf(ctx, hash, prove) 791 } else { 792 if ret.Get(0) != nil { 793 r0 = ret.Get(0).(*coretypes.ResultTx) 794 } 795 } 796 797 if rf, ok := ret.Get(1).(func(context.Context, []byte, bool) error); ok { 798 r1 = rf(ctx, hash, prove) 799 } else { 800 r1 = ret.Error(1) 801 } 802 803 return r0, r1 804 } 805 806 // TxSearch provides a mock function with given fields: ctx, query, prove, page, perPage, orderBy 807 func (_m *Client) TxSearch(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string) (*coretypes.ResultTxSearch, error) { 808 ret := _m.Called(ctx, query, prove, page, perPage, orderBy) 809 810 var r0 *coretypes.ResultTxSearch 811 var r1 error 812 if rf, ok := ret.Get(0).(func(context.Context, string, bool, *int, *int, string) (*coretypes.ResultTxSearch, error)); ok { 813 return rf(ctx, query, prove, page, perPage, orderBy) 814 } 815 if rf, ok := ret.Get(0).(func(context.Context, string, bool, *int, *int, string) *coretypes.ResultTxSearch); ok { 816 r0 = rf(ctx, query, prove, page, perPage, orderBy) 817 } else { 818 if ret.Get(0) != nil { 819 r0 = ret.Get(0).(*coretypes.ResultTxSearch) 820 } 821 } 822 823 if rf, ok := ret.Get(1).(func(context.Context, string, bool, *int, *int, string) error); ok { 824 r1 = rf(ctx, query, prove, page, perPage, orderBy) 825 } else { 826 r1 = ret.Error(1) 827 } 828 829 return r0, r1 830 } 831 832 // UnconfirmedTxs provides a mock function with given fields: ctx, limit 833 func (_m *Client) UnconfirmedTxs(ctx context.Context, limit *int) (*coretypes.ResultUnconfirmedTxs, error) { 834 ret := _m.Called(ctx, limit) 835 836 var r0 *coretypes.ResultUnconfirmedTxs 837 var r1 error 838 if rf, ok := ret.Get(0).(func(context.Context, *int) (*coretypes.ResultUnconfirmedTxs, error)); ok { 839 return rf(ctx, limit) 840 } 841 if rf, ok := ret.Get(0).(func(context.Context, *int) *coretypes.ResultUnconfirmedTxs); ok { 842 r0 = rf(ctx, limit) 843 } else { 844 if ret.Get(0) != nil { 845 r0 = ret.Get(0).(*coretypes.ResultUnconfirmedTxs) 846 } 847 } 848 849 if rf, ok := ret.Get(1).(func(context.Context, *int) error); ok { 850 r1 = rf(ctx, limit) 851 } else { 852 r1 = ret.Error(1) 853 } 854 855 return r0, r1 856 } 857 858 // Unsubscribe provides a mock function with given fields: ctx, subscriber, query 859 func (_m *Client) Unsubscribe(ctx context.Context, subscriber string, query string) error { 860 ret := _m.Called(ctx, subscriber, query) 861 862 var r0 error 863 if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { 864 r0 = rf(ctx, subscriber, query) 865 } else { 866 r0 = ret.Error(0) 867 } 868 869 return r0 870 } 871 872 // UnsubscribeAll provides a mock function with given fields: ctx, subscriber 873 func (_m *Client) UnsubscribeAll(ctx context.Context, subscriber string) error { 874 ret := _m.Called(ctx, subscriber) 875 876 var r0 error 877 if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { 878 r0 = rf(ctx, subscriber) 879 } else { 880 r0 = ret.Error(0) 881 } 882 883 return r0 884 } 885 886 // Validators provides a mock function with given fields: ctx, height, page, perPage 887 func (_m *Client) Validators(ctx context.Context, height *int64, page *int, perPage *int) (*coretypes.ResultValidators, error) { 888 ret := _m.Called(ctx, height, page, perPage) 889 890 var r0 *coretypes.ResultValidators 891 var r1 error 892 if rf, ok := ret.Get(0).(func(context.Context, *int64, *int, *int) (*coretypes.ResultValidators, error)); ok { 893 return rf(ctx, height, page, perPage) 894 } 895 if rf, ok := ret.Get(0).(func(context.Context, *int64, *int, *int) *coretypes.ResultValidators); ok { 896 r0 = rf(ctx, height, page, perPage) 897 } else { 898 if ret.Get(0) != nil { 899 r0 = ret.Get(0).(*coretypes.ResultValidators) 900 } 901 } 902 903 if rf, ok := ret.Get(1).(func(context.Context, *int64, *int, *int) error); ok { 904 r1 = rf(ctx, height, page, perPage) 905 } else { 906 r1 = ret.Error(1) 907 } 908 909 return r0, r1 910 } 911 912 // 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. 913 // The first argument is typically a *testing.T value. 914 func NewClient(t interface { 915 mock.TestingT 916 Cleanup(func()) 917 }) *Client { 918 mock := &Client{} 919 mock.Mock.Test(t) 920 921 t.Cleanup(func() { mock.AssertExpectations(t) }) 922 923 return mock 924 }