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