github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/engine/access/mock/execution_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 execution "github.com/onflow/flow/protobuf/go/flow/execution" 9 mock "github.com/stretchr/testify/mock" 10 ) 11 12 // ExecutionAPIServer is an autogenerated mock type for the ExecutionAPIServer type 13 type ExecutionAPIServer struct { 14 mock.Mock 15 } 16 17 // ExecuteScriptAtBlockID provides a mock function with given fields: _a0, _a1 18 func (_m *ExecutionAPIServer) ExecuteScriptAtBlockID(_a0 context.Context, _a1 *execution.ExecuteScriptAtBlockIDRequest) (*execution.ExecuteScriptAtBlockIDResponse, error) { 19 ret := _m.Called(_a0, _a1) 20 21 var r0 *execution.ExecuteScriptAtBlockIDResponse 22 var r1 error 23 if rf, ok := ret.Get(0).(func(context.Context, *execution.ExecuteScriptAtBlockIDRequest) (*execution.ExecuteScriptAtBlockIDResponse, error)); ok { 24 return rf(_a0, _a1) 25 } 26 if rf, ok := ret.Get(0).(func(context.Context, *execution.ExecuteScriptAtBlockIDRequest) *execution.ExecuteScriptAtBlockIDResponse); ok { 27 r0 = rf(_a0, _a1) 28 } else { 29 if ret.Get(0) != nil { 30 r0 = ret.Get(0).(*execution.ExecuteScriptAtBlockIDResponse) 31 } 32 } 33 34 if rf, ok := ret.Get(1).(func(context.Context, *execution.ExecuteScriptAtBlockIDRequest) error); ok { 35 r1 = rf(_a0, _a1) 36 } else { 37 r1 = ret.Error(1) 38 } 39 40 return r0, r1 41 } 42 43 // GetAccountAtBlockID provides a mock function with given fields: _a0, _a1 44 func (_m *ExecutionAPIServer) GetAccountAtBlockID(_a0 context.Context, _a1 *execution.GetAccountAtBlockIDRequest) (*execution.GetAccountAtBlockIDResponse, error) { 45 ret := _m.Called(_a0, _a1) 46 47 var r0 *execution.GetAccountAtBlockIDResponse 48 var r1 error 49 if rf, ok := ret.Get(0).(func(context.Context, *execution.GetAccountAtBlockIDRequest) (*execution.GetAccountAtBlockIDResponse, error)); ok { 50 return rf(_a0, _a1) 51 } 52 if rf, ok := ret.Get(0).(func(context.Context, *execution.GetAccountAtBlockIDRequest) *execution.GetAccountAtBlockIDResponse); ok { 53 r0 = rf(_a0, _a1) 54 } else { 55 if ret.Get(0) != nil { 56 r0 = ret.Get(0).(*execution.GetAccountAtBlockIDResponse) 57 } 58 } 59 60 if rf, ok := ret.Get(1).(func(context.Context, *execution.GetAccountAtBlockIDRequest) error); ok { 61 r1 = rf(_a0, _a1) 62 } else { 63 r1 = ret.Error(1) 64 } 65 66 return r0, r1 67 } 68 69 // GetBlockHeaderByID provides a mock function with given fields: _a0, _a1 70 func (_m *ExecutionAPIServer) GetBlockHeaderByID(_a0 context.Context, _a1 *execution.GetBlockHeaderByIDRequest) (*execution.BlockHeaderResponse, error) { 71 ret := _m.Called(_a0, _a1) 72 73 var r0 *execution.BlockHeaderResponse 74 var r1 error 75 if rf, ok := ret.Get(0).(func(context.Context, *execution.GetBlockHeaderByIDRequest) (*execution.BlockHeaderResponse, error)); ok { 76 return rf(_a0, _a1) 77 } 78 if rf, ok := ret.Get(0).(func(context.Context, *execution.GetBlockHeaderByIDRequest) *execution.BlockHeaderResponse); ok { 79 r0 = rf(_a0, _a1) 80 } else { 81 if ret.Get(0) != nil { 82 r0 = ret.Get(0).(*execution.BlockHeaderResponse) 83 } 84 } 85 86 if rf, ok := ret.Get(1).(func(context.Context, *execution.GetBlockHeaderByIDRequest) error); ok { 87 r1 = rf(_a0, _a1) 88 } else { 89 r1 = ret.Error(1) 90 } 91 92 return r0, r1 93 } 94 95 // GetEventsForBlockIDs provides a mock function with given fields: _a0, _a1 96 func (_m *ExecutionAPIServer) GetEventsForBlockIDs(_a0 context.Context, _a1 *execution.GetEventsForBlockIDsRequest) (*execution.GetEventsForBlockIDsResponse, error) { 97 ret := _m.Called(_a0, _a1) 98 99 var r0 *execution.GetEventsForBlockIDsResponse 100 var r1 error 101 if rf, ok := ret.Get(0).(func(context.Context, *execution.GetEventsForBlockIDsRequest) (*execution.GetEventsForBlockIDsResponse, error)); ok { 102 return rf(_a0, _a1) 103 } 104 if rf, ok := ret.Get(0).(func(context.Context, *execution.GetEventsForBlockIDsRequest) *execution.GetEventsForBlockIDsResponse); ok { 105 r0 = rf(_a0, _a1) 106 } else { 107 if ret.Get(0) != nil { 108 r0 = ret.Get(0).(*execution.GetEventsForBlockIDsResponse) 109 } 110 } 111 112 if rf, ok := ret.Get(1).(func(context.Context, *execution.GetEventsForBlockIDsRequest) error); ok { 113 r1 = rf(_a0, _a1) 114 } else { 115 r1 = ret.Error(1) 116 } 117 118 return r0, r1 119 } 120 121 // GetLatestBlockHeader provides a mock function with given fields: _a0, _a1 122 func (_m *ExecutionAPIServer) GetLatestBlockHeader(_a0 context.Context, _a1 *execution.GetLatestBlockHeaderRequest) (*execution.BlockHeaderResponse, error) { 123 ret := _m.Called(_a0, _a1) 124 125 var r0 *execution.BlockHeaderResponse 126 var r1 error 127 if rf, ok := ret.Get(0).(func(context.Context, *execution.GetLatestBlockHeaderRequest) (*execution.BlockHeaderResponse, error)); ok { 128 return rf(_a0, _a1) 129 } 130 if rf, ok := ret.Get(0).(func(context.Context, *execution.GetLatestBlockHeaderRequest) *execution.BlockHeaderResponse); ok { 131 r0 = rf(_a0, _a1) 132 } else { 133 if ret.Get(0) != nil { 134 r0 = ret.Get(0).(*execution.BlockHeaderResponse) 135 } 136 } 137 138 if rf, ok := ret.Get(1).(func(context.Context, *execution.GetLatestBlockHeaderRequest) error); ok { 139 r1 = rf(_a0, _a1) 140 } else { 141 r1 = ret.Error(1) 142 } 143 144 return r0, r1 145 } 146 147 // GetRegisterAtBlockID provides a mock function with given fields: _a0, _a1 148 func (_m *ExecutionAPIServer) GetRegisterAtBlockID(_a0 context.Context, _a1 *execution.GetRegisterAtBlockIDRequest) (*execution.GetRegisterAtBlockIDResponse, error) { 149 ret := _m.Called(_a0, _a1) 150 151 var r0 *execution.GetRegisterAtBlockIDResponse 152 var r1 error 153 if rf, ok := ret.Get(0).(func(context.Context, *execution.GetRegisterAtBlockIDRequest) (*execution.GetRegisterAtBlockIDResponse, error)); ok { 154 return rf(_a0, _a1) 155 } 156 if rf, ok := ret.Get(0).(func(context.Context, *execution.GetRegisterAtBlockIDRequest) *execution.GetRegisterAtBlockIDResponse); ok { 157 r0 = rf(_a0, _a1) 158 } else { 159 if ret.Get(0) != nil { 160 r0 = ret.Get(0).(*execution.GetRegisterAtBlockIDResponse) 161 } 162 } 163 164 if rf, ok := ret.Get(1).(func(context.Context, *execution.GetRegisterAtBlockIDRequest) error); ok { 165 r1 = rf(_a0, _a1) 166 } else { 167 r1 = ret.Error(1) 168 } 169 170 return r0, r1 171 } 172 173 // GetTransactionErrorMessage provides a mock function with given fields: _a0, _a1 174 func (_m *ExecutionAPIServer) GetTransactionErrorMessage(_a0 context.Context, _a1 *execution.GetTransactionErrorMessageRequest) (*execution.GetTransactionErrorMessageResponse, error) { 175 ret := _m.Called(_a0, _a1) 176 177 var r0 *execution.GetTransactionErrorMessageResponse 178 var r1 error 179 if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionErrorMessageRequest) (*execution.GetTransactionErrorMessageResponse, error)); ok { 180 return rf(_a0, _a1) 181 } 182 if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionErrorMessageRequest) *execution.GetTransactionErrorMessageResponse); ok { 183 r0 = rf(_a0, _a1) 184 } else { 185 if ret.Get(0) != nil { 186 r0 = ret.Get(0).(*execution.GetTransactionErrorMessageResponse) 187 } 188 } 189 190 if rf, ok := ret.Get(1).(func(context.Context, *execution.GetTransactionErrorMessageRequest) error); ok { 191 r1 = rf(_a0, _a1) 192 } else { 193 r1 = ret.Error(1) 194 } 195 196 return r0, r1 197 } 198 199 // GetTransactionErrorMessageByIndex provides a mock function with given fields: _a0, _a1 200 func (_m *ExecutionAPIServer) GetTransactionErrorMessageByIndex(_a0 context.Context, _a1 *execution.GetTransactionErrorMessageByIndexRequest) (*execution.GetTransactionErrorMessageResponse, error) { 201 ret := _m.Called(_a0, _a1) 202 203 var r0 *execution.GetTransactionErrorMessageResponse 204 var r1 error 205 if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionErrorMessageByIndexRequest) (*execution.GetTransactionErrorMessageResponse, error)); ok { 206 return rf(_a0, _a1) 207 } 208 if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionErrorMessageByIndexRequest) *execution.GetTransactionErrorMessageResponse); ok { 209 r0 = rf(_a0, _a1) 210 } else { 211 if ret.Get(0) != nil { 212 r0 = ret.Get(0).(*execution.GetTransactionErrorMessageResponse) 213 } 214 } 215 216 if rf, ok := ret.Get(1).(func(context.Context, *execution.GetTransactionErrorMessageByIndexRequest) error); ok { 217 r1 = rf(_a0, _a1) 218 } else { 219 r1 = ret.Error(1) 220 } 221 222 return r0, r1 223 } 224 225 // GetTransactionErrorMessagesByBlockID provides a mock function with given fields: _a0, _a1 226 func (_m *ExecutionAPIServer) GetTransactionErrorMessagesByBlockID(_a0 context.Context, _a1 *execution.GetTransactionErrorMessagesByBlockIDRequest) (*execution.GetTransactionErrorMessagesResponse, error) { 227 ret := _m.Called(_a0, _a1) 228 229 var r0 *execution.GetTransactionErrorMessagesResponse 230 var r1 error 231 if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionErrorMessagesByBlockIDRequest) (*execution.GetTransactionErrorMessagesResponse, error)); ok { 232 return rf(_a0, _a1) 233 } 234 if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionErrorMessagesByBlockIDRequest) *execution.GetTransactionErrorMessagesResponse); ok { 235 r0 = rf(_a0, _a1) 236 } else { 237 if ret.Get(0) != nil { 238 r0 = ret.Get(0).(*execution.GetTransactionErrorMessagesResponse) 239 } 240 } 241 242 if rf, ok := ret.Get(1).(func(context.Context, *execution.GetTransactionErrorMessagesByBlockIDRequest) error); ok { 243 r1 = rf(_a0, _a1) 244 } else { 245 r1 = ret.Error(1) 246 } 247 248 return r0, r1 249 } 250 251 // GetTransactionResult provides a mock function with given fields: _a0, _a1 252 func (_m *ExecutionAPIServer) GetTransactionResult(_a0 context.Context, _a1 *execution.GetTransactionResultRequest) (*execution.GetTransactionResultResponse, error) { 253 ret := _m.Called(_a0, _a1) 254 255 var r0 *execution.GetTransactionResultResponse 256 var r1 error 257 if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionResultRequest) (*execution.GetTransactionResultResponse, error)); ok { 258 return rf(_a0, _a1) 259 } 260 if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionResultRequest) *execution.GetTransactionResultResponse); ok { 261 r0 = rf(_a0, _a1) 262 } else { 263 if ret.Get(0) != nil { 264 r0 = ret.Get(0).(*execution.GetTransactionResultResponse) 265 } 266 } 267 268 if rf, ok := ret.Get(1).(func(context.Context, *execution.GetTransactionResultRequest) error); ok { 269 r1 = rf(_a0, _a1) 270 } else { 271 r1 = ret.Error(1) 272 } 273 274 return r0, r1 275 } 276 277 // GetTransactionResultByIndex provides a mock function with given fields: _a0, _a1 278 func (_m *ExecutionAPIServer) GetTransactionResultByIndex(_a0 context.Context, _a1 *execution.GetTransactionByIndexRequest) (*execution.GetTransactionResultResponse, error) { 279 ret := _m.Called(_a0, _a1) 280 281 var r0 *execution.GetTransactionResultResponse 282 var r1 error 283 if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionByIndexRequest) (*execution.GetTransactionResultResponse, error)); ok { 284 return rf(_a0, _a1) 285 } 286 if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionByIndexRequest) *execution.GetTransactionResultResponse); ok { 287 r0 = rf(_a0, _a1) 288 } else { 289 if ret.Get(0) != nil { 290 r0 = ret.Get(0).(*execution.GetTransactionResultResponse) 291 } 292 } 293 294 if rf, ok := ret.Get(1).(func(context.Context, *execution.GetTransactionByIndexRequest) error); ok { 295 r1 = rf(_a0, _a1) 296 } else { 297 r1 = ret.Error(1) 298 } 299 300 return r0, r1 301 } 302 303 // GetTransactionResultsByBlockID provides a mock function with given fields: _a0, _a1 304 func (_m *ExecutionAPIServer) GetTransactionResultsByBlockID(_a0 context.Context, _a1 *execution.GetTransactionsByBlockIDRequest) (*execution.GetTransactionResultsResponse, error) { 305 ret := _m.Called(_a0, _a1) 306 307 var r0 *execution.GetTransactionResultsResponse 308 var r1 error 309 if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionsByBlockIDRequest) (*execution.GetTransactionResultsResponse, error)); ok { 310 return rf(_a0, _a1) 311 } 312 if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionsByBlockIDRequest) *execution.GetTransactionResultsResponse); ok { 313 r0 = rf(_a0, _a1) 314 } else { 315 if ret.Get(0) != nil { 316 r0 = ret.Get(0).(*execution.GetTransactionResultsResponse) 317 } 318 } 319 320 if rf, ok := ret.Get(1).(func(context.Context, *execution.GetTransactionsByBlockIDRequest) error); ok { 321 r1 = rf(_a0, _a1) 322 } else { 323 r1 = ret.Error(1) 324 } 325 326 return r0, r1 327 } 328 329 // Ping provides a mock function with given fields: _a0, _a1 330 func (_m *ExecutionAPIServer) Ping(_a0 context.Context, _a1 *execution.PingRequest) (*execution.PingResponse, error) { 331 ret := _m.Called(_a0, _a1) 332 333 var r0 *execution.PingResponse 334 var r1 error 335 if rf, ok := ret.Get(0).(func(context.Context, *execution.PingRequest) (*execution.PingResponse, error)); ok { 336 return rf(_a0, _a1) 337 } 338 if rf, ok := ret.Get(0).(func(context.Context, *execution.PingRequest) *execution.PingResponse); ok { 339 r0 = rf(_a0, _a1) 340 } else { 341 if ret.Get(0) != nil { 342 r0 = ret.Get(0).(*execution.PingResponse) 343 } 344 } 345 346 if rf, ok := ret.Get(1).(func(context.Context, *execution.PingRequest) error); ok { 347 r1 = rf(_a0, _a1) 348 } else { 349 r1 = ret.Error(1) 350 } 351 352 return r0, r1 353 } 354 355 type mockConstructorTestingTNewExecutionAPIServer interface { 356 mock.TestingT 357 Cleanup(func()) 358 } 359 360 // NewExecutionAPIServer creates a new instance of ExecutionAPIServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 361 func NewExecutionAPIServer(t mockConstructorTestingTNewExecutionAPIServer) *ExecutionAPIServer { 362 mock := &ExecutionAPIServer{} 363 mock.Mock.Test(t) 364 365 t.Cleanup(func() { mock.AssertExpectations(t) }) 366 367 return mock 368 }