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