github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/engine/access/mock/execution_api_client.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  	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  	var r1 error
    32  	if rf, ok := ret.Get(0).(func(context.Context, *execution.ExecuteScriptAtBlockIDRequest, ...grpc.CallOption) (*execution.ExecuteScriptAtBlockIDResponse, error)); ok {
    33  		return rf(ctx, in, opts...)
    34  	}
    35  	if rf, ok := ret.Get(0).(func(context.Context, *execution.ExecuteScriptAtBlockIDRequest, ...grpc.CallOption) *execution.ExecuteScriptAtBlockIDResponse); ok {
    36  		r0 = rf(ctx, in, opts...)
    37  	} else {
    38  		if ret.Get(0) != nil {
    39  			r0 = ret.Get(0).(*execution.ExecuteScriptAtBlockIDResponse)
    40  		}
    41  	}
    42  
    43  	if rf, ok := ret.Get(1).(func(context.Context, *execution.ExecuteScriptAtBlockIDRequest, ...grpc.CallOption) error); ok {
    44  		r1 = rf(ctx, in, opts...)
    45  	} else {
    46  		r1 = ret.Error(1)
    47  	}
    48  
    49  	return r0, r1
    50  }
    51  
    52  // GetAccountAtBlockID provides a mock function with given fields: ctx, in, opts
    53  func (_m *ExecutionAPIClient) GetAccountAtBlockID(ctx context.Context, in *execution.GetAccountAtBlockIDRequest, opts ...grpc.CallOption) (*execution.GetAccountAtBlockIDResponse, error) {
    54  	_va := make([]interface{}, len(opts))
    55  	for _i := range opts {
    56  		_va[_i] = opts[_i]
    57  	}
    58  	var _ca []interface{}
    59  	_ca = append(_ca, ctx, in)
    60  	_ca = append(_ca, _va...)
    61  	ret := _m.Called(_ca...)
    62  
    63  	var r0 *execution.GetAccountAtBlockIDResponse
    64  	var r1 error
    65  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetAccountAtBlockIDRequest, ...grpc.CallOption) (*execution.GetAccountAtBlockIDResponse, error)); ok {
    66  		return rf(ctx, in, opts...)
    67  	}
    68  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetAccountAtBlockIDRequest, ...grpc.CallOption) *execution.GetAccountAtBlockIDResponse); ok {
    69  		r0 = rf(ctx, in, opts...)
    70  	} else {
    71  		if ret.Get(0) != nil {
    72  			r0 = ret.Get(0).(*execution.GetAccountAtBlockIDResponse)
    73  		}
    74  	}
    75  
    76  	if rf, ok := ret.Get(1).(func(context.Context, *execution.GetAccountAtBlockIDRequest, ...grpc.CallOption) error); ok {
    77  		r1 = rf(ctx, in, opts...)
    78  	} else {
    79  		r1 = ret.Error(1)
    80  	}
    81  
    82  	return r0, r1
    83  }
    84  
    85  // GetBlockHeaderByID provides a mock function with given fields: ctx, in, opts
    86  func (_m *ExecutionAPIClient) GetBlockHeaderByID(ctx context.Context, in *execution.GetBlockHeaderByIDRequest, opts ...grpc.CallOption) (*execution.BlockHeaderResponse, error) {
    87  	_va := make([]interface{}, len(opts))
    88  	for _i := range opts {
    89  		_va[_i] = opts[_i]
    90  	}
    91  	var _ca []interface{}
    92  	_ca = append(_ca, ctx, in)
    93  	_ca = append(_ca, _va...)
    94  	ret := _m.Called(_ca...)
    95  
    96  	var r0 *execution.BlockHeaderResponse
    97  	var r1 error
    98  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetBlockHeaderByIDRequest, ...grpc.CallOption) (*execution.BlockHeaderResponse, error)); ok {
    99  		return rf(ctx, in, opts...)
   100  	}
   101  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetBlockHeaderByIDRequest, ...grpc.CallOption) *execution.BlockHeaderResponse); ok {
   102  		r0 = rf(ctx, in, opts...)
   103  	} else {
   104  		if ret.Get(0) != nil {
   105  			r0 = ret.Get(0).(*execution.BlockHeaderResponse)
   106  		}
   107  	}
   108  
   109  	if rf, ok := ret.Get(1).(func(context.Context, *execution.GetBlockHeaderByIDRequest, ...grpc.CallOption) error); ok {
   110  		r1 = rf(ctx, in, opts...)
   111  	} else {
   112  		r1 = ret.Error(1)
   113  	}
   114  
   115  	return r0, r1
   116  }
   117  
   118  // GetEventsForBlockIDs provides a mock function with given fields: ctx, in, opts
   119  func (_m *ExecutionAPIClient) GetEventsForBlockIDs(ctx context.Context, in *execution.GetEventsForBlockIDsRequest, opts ...grpc.CallOption) (*execution.GetEventsForBlockIDsResponse, error) {
   120  	_va := make([]interface{}, len(opts))
   121  	for _i := range opts {
   122  		_va[_i] = opts[_i]
   123  	}
   124  	var _ca []interface{}
   125  	_ca = append(_ca, ctx, in)
   126  	_ca = append(_ca, _va...)
   127  	ret := _m.Called(_ca...)
   128  
   129  	var r0 *execution.GetEventsForBlockIDsResponse
   130  	var r1 error
   131  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetEventsForBlockIDsRequest, ...grpc.CallOption) (*execution.GetEventsForBlockIDsResponse, error)); ok {
   132  		return rf(ctx, in, opts...)
   133  	}
   134  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetEventsForBlockIDsRequest, ...grpc.CallOption) *execution.GetEventsForBlockIDsResponse); ok {
   135  		r0 = rf(ctx, in, opts...)
   136  	} else {
   137  		if ret.Get(0) != nil {
   138  			r0 = ret.Get(0).(*execution.GetEventsForBlockIDsResponse)
   139  		}
   140  	}
   141  
   142  	if rf, ok := ret.Get(1).(func(context.Context, *execution.GetEventsForBlockIDsRequest, ...grpc.CallOption) error); ok {
   143  		r1 = rf(ctx, in, opts...)
   144  	} else {
   145  		r1 = ret.Error(1)
   146  	}
   147  
   148  	return r0, r1
   149  }
   150  
   151  // GetLatestBlockHeader provides a mock function with given fields: ctx, in, opts
   152  func (_m *ExecutionAPIClient) GetLatestBlockHeader(ctx context.Context, in *execution.GetLatestBlockHeaderRequest, opts ...grpc.CallOption) (*execution.BlockHeaderResponse, error) {
   153  	_va := make([]interface{}, len(opts))
   154  	for _i := range opts {
   155  		_va[_i] = opts[_i]
   156  	}
   157  	var _ca []interface{}
   158  	_ca = append(_ca, ctx, in)
   159  	_ca = append(_ca, _va...)
   160  	ret := _m.Called(_ca...)
   161  
   162  	var r0 *execution.BlockHeaderResponse
   163  	var r1 error
   164  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetLatestBlockHeaderRequest, ...grpc.CallOption) (*execution.BlockHeaderResponse, error)); ok {
   165  		return rf(ctx, in, opts...)
   166  	}
   167  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetLatestBlockHeaderRequest, ...grpc.CallOption) *execution.BlockHeaderResponse); ok {
   168  		r0 = rf(ctx, in, opts...)
   169  	} else {
   170  		if ret.Get(0) != nil {
   171  			r0 = ret.Get(0).(*execution.BlockHeaderResponse)
   172  		}
   173  	}
   174  
   175  	if rf, ok := ret.Get(1).(func(context.Context, *execution.GetLatestBlockHeaderRequest, ...grpc.CallOption) error); ok {
   176  		r1 = rf(ctx, in, opts...)
   177  	} else {
   178  		r1 = ret.Error(1)
   179  	}
   180  
   181  	return r0, r1
   182  }
   183  
   184  // GetRegisterAtBlockID provides a mock function with given fields: ctx, in, opts
   185  func (_m *ExecutionAPIClient) GetRegisterAtBlockID(ctx context.Context, in *execution.GetRegisterAtBlockIDRequest, opts ...grpc.CallOption) (*execution.GetRegisterAtBlockIDResponse, error) {
   186  	_va := make([]interface{}, len(opts))
   187  	for _i := range opts {
   188  		_va[_i] = opts[_i]
   189  	}
   190  	var _ca []interface{}
   191  	_ca = append(_ca, ctx, in)
   192  	_ca = append(_ca, _va...)
   193  	ret := _m.Called(_ca...)
   194  
   195  	var r0 *execution.GetRegisterAtBlockIDResponse
   196  	var r1 error
   197  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetRegisterAtBlockIDRequest, ...grpc.CallOption) (*execution.GetRegisterAtBlockIDResponse, error)); ok {
   198  		return rf(ctx, in, opts...)
   199  	}
   200  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetRegisterAtBlockIDRequest, ...grpc.CallOption) *execution.GetRegisterAtBlockIDResponse); ok {
   201  		r0 = rf(ctx, in, opts...)
   202  	} else {
   203  		if ret.Get(0) != nil {
   204  			r0 = ret.Get(0).(*execution.GetRegisterAtBlockIDResponse)
   205  		}
   206  	}
   207  
   208  	if rf, ok := ret.Get(1).(func(context.Context, *execution.GetRegisterAtBlockIDRequest, ...grpc.CallOption) error); ok {
   209  		r1 = rf(ctx, in, opts...)
   210  	} else {
   211  		r1 = ret.Error(1)
   212  	}
   213  
   214  	return r0, r1
   215  }
   216  
   217  // GetTransactionErrorMessage provides a mock function with given fields: ctx, in, opts
   218  func (_m *ExecutionAPIClient) GetTransactionErrorMessage(ctx context.Context, in *execution.GetTransactionErrorMessageRequest, opts ...grpc.CallOption) (*execution.GetTransactionErrorMessageResponse, error) {
   219  	_va := make([]interface{}, len(opts))
   220  	for _i := range opts {
   221  		_va[_i] = opts[_i]
   222  	}
   223  	var _ca []interface{}
   224  	_ca = append(_ca, ctx, in)
   225  	_ca = append(_ca, _va...)
   226  	ret := _m.Called(_ca...)
   227  
   228  	var r0 *execution.GetTransactionErrorMessageResponse
   229  	var r1 error
   230  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionErrorMessageRequest, ...grpc.CallOption) (*execution.GetTransactionErrorMessageResponse, error)); ok {
   231  		return rf(ctx, in, opts...)
   232  	}
   233  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionErrorMessageRequest, ...grpc.CallOption) *execution.GetTransactionErrorMessageResponse); ok {
   234  		r0 = rf(ctx, in, opts...)
   235  	} else {
   236  		if ret.Get(0) != nil {
   237  			r0 = ret.Get(0).(*execution.GetTransactionErrorMessageResponse)
   238  		}
   239  	}
   240  
   241  	if rf, ok := ret.Get(1).(func(context.Context, *execution.GetTransactionErrorMessageRequest, ...grpc.CallOption) error); ok {
   242  		r1 = rf(ctx, in, opts...)
   243  	} else {
   244  		r1 = ret.Error(1)
   245  	}
   246  
   247  	return r0, r1
   248  }
   249  
   250  // GetTransactionErrorMessageByIndex provides a mock function with given fields: ctx, in, opts
   251  func (_m *ExecutionAPIClient) GetTransactionErrorMessageByIndex(ctx context.Context, in *execution.GetTransactionErrorMessageByIndexRequest, opts ...grpc.CallOption) (*execution.GetTransactionErrorMessageResponse, error) {
   252  	_va := make([]interface{}, len(opts))
   253  	for _i := range opts {
   254  		_va[_i] = opts[_i]
   255  	}
   256  	var _ca []interface{}
   257  	_ca = append(_ca, ctx, in)
   258  	_ca = append(_ca, _va...)
   259  	ret := _m.Called(_ca...)
   260  
   261  	var r0 *execution.GetTransactionErrorMessageResponse
   262  	var r1 error
   263  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionErrorMessageByIndexRequest, ...grpc.CallOption) (*execution.GetTransactionErrorMessageResponse, error)); ok {
   264  		return rf(ctx, in, opts...)
   265  	}
   266  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionErrorMessageByIndexRequest, ...grpc.CallOption) *execution.GetTransactionErrorMessageResponse); ok {
   267  		r0 = rf(ctx, in, opts...)
   268  	} else {
   269  		if ret.Get(0) != nil {
   270  			r0 = ret.Get(0).(*execution.GetTransactionErrorMessageResponse)
   271  		}
   272  	}
   273  
   274  	if rf, ok := ret.Get(1).(func(context.Context, *execution.GetTransactionErrorMessageByIndexRequest, ...grpc.CallOption) error); ok {
   275  		r1 = rf(ctx, in, opts...)
   276  	} else {
   277  		r1 = ret.Error(1)
   278  	}
   279  
   280  	return r0, r1
   281  }
   282  
   283  // GetTransactionErrorMessagesByBlockID provides a mock function with given fields: ctx, in, opts
   284  func (_m *ExecutionAPIClient) GetTransactionErrorMessagesByBlockID(ctx context.Context, in *execution.GetTransactionErrorMessagesByBlockIDRequest, opts ...grpc.CallOption) (*execution.GetTransactionErrorMessagesResponse, error) {
   285  	_va := make([]interface{}, len(opts))
   286  	for _i := range opts {
   287  		_va[_i] = opts[_i]
   288  	}
   289  	var _ca []interface{}
   290  	_ca = append(_ca, ctx, in)
   291  	_ca = append(_ca, _va...)
   292  	ret := _m.Called(_ca...)
   293  
   294  	var r0 *execution.GetTransactionErrorMessagesResponse
   295  	var r1 error
   296  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionErrorMessagesByBlockIDRequest, ...grpc.CallOption) (*execution.GetTransactionErrorMessagesResponse, error)); ok {
   297  		return rf(ctx, in, opts...)
   298  	}
   299  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionErrorMessagesByBlockIDRequest, ...grpc.CallOption) *execution.GetTransactionErrorMessagesResponse); ok {
   300  		r0 = rf(ctx, in, opts...)
   301  	} else {
   302  		if ret.Get(0) != nil {
   303  			r0 = ret.Get(0).(*execution.GetTransactionErrorMessagesResponse)
   304  		}
   305  	}
   306  
   307  	if rf, ok := ret.Get(1).(func(context.Context, *execution.GetTransactionErrorMessagesByBlockIDRequest, ...grpc.CallOption) error); ok {
   308  		r1 = rf(ctx, in, opts...)
   309  	} else {
   310  		r1 = ret.Error(1)
   311  	}
   312  
   313  	return r0, r1
   314  }
   315  
   316  // GetTransactionResult provides a mock function with given fields: ctx, in, opts
   317  func (_m *ExecutionAPIClient) GetTransactionResult(ctx context.Context, in *execution.GetTransactionResultRequest, opts ...grpc.CallOption) (*execution.GetTransactionResultResponse, error) {
   318  	_va := make([]interface{}, len(opts))
   319  	for _i := range opts {
   320  		_va[_i] = opts[_i]
   321  	}
   322  	var _ca []interface{}
   323  	_ca = append(_ca, ctx, in)
   324  	_ca = append(_ca, _va...)
   325  	ret := _m.Called(_ca...)
   326  
   327  	var r0 *execution.GetTransactionResultResponse
   328  	var r1 error
   329  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionResultRequest, ...grpc.CallOption) (*execution.GetTransactionResultResponse, error)); ok {
   330  		return rf(ctx, in, opts...)
   331  	}
   332  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionResultRequest, ...grpc.CallOption) *execution.GetTransactionResultResponse); ok {
   333  		r0 = rf(ctx, in, opts...)
   334  	} else {
   335  		if ret.Get(0) != nil {
   336  			r0 = ret.Get(0).(*execution.GetTransactionResultResponse)
   337  		}
   338  	}
   339  
   340  	if rf, ok := ret.Get(1).(func(context.Context, *execution.GetTransactionResultRequest, ...grpc.CallOption) error); ok {
   341  		r1 = rf(ctx, in, opts...)
   342  	} else {
   343  		r1 = ret.Error(1)
   344  	}
   345  
   346  	return r0, r1
   347  }
   348  
   349  // GetTransactionResultByIndex provides a mock function with given fields: ctx, in, opts
   350  func (_m *ExecutionAPIClient) GetTransactionResultByIndex(ctx context.Context, in *execution.GetTransactionByIndexRequest, opts ...grpc.CallOption) (*execution.GetTransactionResultResponse, error) {
   351  	_va := make([]interface{}, len(opts))
   352  	for _i := range opts {
   353  		_va[_i] = opts[_i]
   354  	}
   355  	var _ca []interface{}
   356  	_ca = append(_ca, ctx, in)
   357  	_ca = append(_ca, _va...)
   358  	ret := _m.Called(_ca...)
   359  
   360  	var r0 *execution.GetTransactionResultResponse
   361  	var r1 error
   362  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionByIndexRequest, ...grpc.CallOption) (*execution.GetTransactionResultResponse, error)); ok {
   363  		return rf(ctx, in, opts...)
   364  	}
   365  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionByIndexRequest, ...grpc.CallOption) *execution.GetTransactionResultResponse); ok {
   366  		r0 = rf(ctx, in, opts...)
   367  	} else {
   368  		if ret.Get(0) != nil {
   369  			r0 = ret.Get(0).(*execution.GetTransactionResultResponse)
   370  		}
   371  	}
   372  
   373  	if rf, ok := ret.Get(1).(func(context.Context, *execution.GetTransactionByIndexRequest, ...grpc.CallOption) error); ok {
   374  		r1 = rf(ctx, in, opts...)
   375  	} else {
   376  		r1 = ret.Error(1)
   377  	}
   378  
   379  	return r0, r1
   380  }
   381  
   382  // GetTransactionResultsByBlockID provides a mock function with given fields: ctx, in, opts
   383  func (_m *ExecutionAPIClient) GetTransactionResultsByBlockID(ctx context.Context, in *execution.GetTransactionsByBlockIDRequest, opts ...grpc.CallOption) (*execution.GetTransactionResultsResponse, error) {
   384  	_va := make([]interface{}, len(opts))
   385  	for _i := range opts {
   386  		_va[_i] = opts[_i]
   387  	}
   388  	var _ca []interface{}
   389  	_ca = append(_ca, ctx, in)
   390  	_ca = append(_ca, _va...)
   391  	ret := _m.Called(_ca...)
   392  
   393  	var r0 *execution.GetTransactionResultsResponse
   394  	var r1 error
   395  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionsByBlockIDRequest, ...grpc.CallOption) (*execution.GetTransactionResultsResponse, error)); ok {
   396  		return rf(ctx, in, opts...)
   397  	}
   398  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionsByBlockIDRequest, ...grpc.CallOption) *execution.GetTransactionResultsResponse); ok {
   399  		r0 = rf(ctx, in, opts...)
   400  	} else {
   401  		if ret.Get(0) != nil {
   402  			r0 = ret.Get(0).(*execution.GetTransactionResultsResponse)
   403  		}
   404  	}
   405  
   406  	if rf, ok := ret.Get(1).(func(context.Context, *execution.GetTransactionsByBlockIDRequest, ...grpc.CallOption) error); ok {
   407  		r1 = rf(ctx, in, opts...)
   408  	} else {
   409  		r1 = ret.Error(1)
   410  	}
   411  
   412  	return r0, r1
   413  }
   414  
   415  // Ping provides a mock function with given fields: ctx, in, opts
   416  func (_m *ExecutionAPIClient) Ping(ctx context.Context, in *execution.PingRequest, opts ...grpc.CallOption) (*execution.PingResponse, error) {
   417  	_va := make([]interface{}, len(opts))
   418  	for _i := range opts {
   419  		_va[_i] = opts[_i]
   420  	}
   421  	var _ca []interface{}
   422  	_ca = append(_ca, ctx, in)
   423  	_ca = append(_ca, _va...)
   424  	ret := _m.Called(_ca...)
   425  
   426  	var r0 *execution.PingResponse
   427  	var r1 error
   428  	if rf, ok := ret.Get(0).(func(context.Context, *execution.PingRequest, ...grpc.CallOption) (*execution.PingResponse, error)); ok {
   429  		return rf(ctx, in, opts...)
   430  	}
   431  	if rf, ok := ret.Get(0).(func(context.Context, *execution.PingRequest, ...grpc.CallOption) *execution.PingResponse); ok {
   432  		r0 = rf(ctx, in, opts...)
   433  	} else {
   434  		if ret.Get(0) != nil {
   435  			r0 = ret.Get(0).(*execution.PingResponse)
   436  		}
   437  	}
   438  
   439  	if rf, ok := ret.Get(1).(func(context.Context, *execution.PingRequest, ...grpc.CallOption) error); ok {
   440  		r1 = rf(ctx, in, opts...)
   441  	} else {
   442  		r1 = ret.Error(1)
   443  	}
   444  
   445  	return r0, r1
   446  }
   447  
   448  type mockConstructorTestingTNewExecutionAPIClient interface {
   449  	mock.TestingT
   450  	Cleanup(func())
   451  }
   452  
   453  // 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.
   454  func NewExecutionAPIClient(t mockConstructorTestingTNewExecutionAPIClient) *ExecutionAPIClient {
   455  	mock := &ExecutionAPIClient{}
   456  	mock.Mock.Test(t)
   457  
   458  	t.Cleanup(func() { mock.AssertExpectations(t) })
   459  
   460  	return mock
   461  }