github.com/koko1123/flow-go-1@v0.29.6/storage/mock/events.go (about)

     1  // Code generated by mockery v2.13.1. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	flow "github.com/koko1123/flow-go-1/model/flow"
     7  	mock "github.com/stretchr/testify/mock"
     8  
     9  	storage "github.com/koko1123/flow-go-1/storage"
    10  )
    11  
    12  // Events is an autogenerated mock type for the Events type
    13  type Events struct {
    14  	mock.Mock
    15  }
    16  
    17  // BatchRemoveByBlockID provides a mock function with given fields: blockID, batch
    18  func (_m *Events) BatchRemoveByBlockID(blockID flow.Identifier, batch storage.BatchStorage) error {
    19  	ret := _m.Called(blockID, batch)
    20  
    21  	var r0 error
    22  	if rf, ok := ret.Get(0).(func(flow.Identifier, storage.BatchStorage) error); ok {
    23  		r0 = rf(blockID, batch)
    24  	} else {
    25  		r0 = ret.Error(0)
    26  	}
    27  
    28  	return r0
    29  }
    30  
    31  // BatchStore provides a mock function with given fields: blockID, events, batch
    32  func (_m *Events) BatchStore(blockID flow.Identifier, events []flow.EventsList, batch storage.BatchStorage) error {
    33  	ret := _m.Called(blockID, events, batch)
    34  
    35  	var r0 error
    36  	if rf, ok := ret.Get(0).(func(flow.Identifier, []flow.EventsList, storage.BatchStorage) error); ok {
    37  		r0 = rf(blockID, events, batch)
    38  	} else {
    39  		r0 = ret.Error(0)
    40  	}
    41  
    42  	return r0
    43  }
    44  
    45  // ByBlockID provides a mock function with given fields: blockID
    46  func (_m *Events) ByBlockID(blockID flow.Identifier) ([]flow.Event, error) {
    47  	ret := _m.Called(blockID)
    48  
    49  	var r0 []flow.Event
    50  	if rf, ok := ret.Get(0).(func(flow.Identifier) []flow.Event); ok {
    51  		r0 = rf(blockID)
    52  	} else {
    53  		if ret.Get(0) != nil {
    54  			r0 = ret.Get(0).([]flow.Event)
    55  		}
    56  	}
    57  
    58  	var r1 error
    59  	if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok {
    60  		r1 = rf(blockID)
    61  	} else {
    62  		r1 = ret.Error(1)
    63  	}
    64  
    65  	return r0, r1
    66  }
    67  
    68  // ByBlockIDEventType provides a mock function with given fields: blockID, eventType
    69  func (_m *Events) ByBlockIDEventType(blockID flow.Identifier, eventType flow.EventType) ([]flow.Event, error) {
    70  	ret := _m.Called(blockID, eventType)
    71  
    72  	var r0 []flow.Event
    73  	if rf, ok := ret.Get(0).(func(flow.Identifier, flow.EventType) []flow.Event); ok {
    74  		r0 = rf(blockID, eventType)
    75  	} else {
    76  		if ret.Get(0) != nil {
    77  			r0 = ret.Get(0).([]flow.Event)
    78  		}
    79  	}
    80  
    81  	var r1 error
    82  	if rf, ok := ret.Get(1).(func(flow.Identifier, flow.EventType) error); ok {
    83  		r1 = rf(blockID, eventType)
    84  	} else {
    85  		r1 = ret.Error(1)
    86  	}
    87  
    88  	return r0, r1
    89  }
    90  
    91  // ByBlockIDTransactionID provides a mock function with given fields: blockID, transactionID
    92  func (_m *Events) ByBlockIDTransactionID(blockID flow.Identifier, transactionID flow.Identifier) ([]flow.Event, error) {
    93  	ret := _m.Called(blockID, transactionID)
    94  
    95  	var r0 []flow.Event
    96  	if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) []flow.Event); ok {
    97  		r0 = rf(blockID, transactionID)
    98  	} else {
    99  		if ret.Get(0) != nil {
   100  			r0 = ret.Get(0).([]flow.Event)
   101  		}
   102  	}
   103  
   104  	var r1 error
   105  	if rf, ok := ret.Get(1).(func(flow.Identifier, flow.Identifier) error); ok {
   106  		r1 = rf(blockID, transactionID)
   107  	} else {
   108  		r1 = ret.Error(1)
   109  	}
   110  
   111  	return r0, r1
   112  }
   113  
   114  // ByBlockIDTransactionIndex provides a mock function with given fields: blockID, txIndex
   115  func (_m *Events) ByBlockIDTransactionIndex(blockID flow.Identifier, txIndex uint32) ([]flow.Event, error) {
   116  	ret := _m.Called(blockID, txIndex)
   117  
   118  	var r0 []flow.Event
   119  	if rf, ok := ret.Get(0).(func(flow.Identifier, uint32) []flow.Event); ok {
   120  		r0 = rf(blockID, txIndex)
   121  	} else {
   122  		if ret.Get(0) != nil {
   123  			r0 = ret.Get(0).([]flow.Event)
   124  		}
   125  	}
   126  
   127  	var r1 error
   128  	if rf, ok := ret.Get(1).(func(flow.Identifier, uint32) error); ok {
   129  		r1 = rf(blockID, txIndex)
   130  	} else {
   131  		r1 = ret.Error(1)
   132  	}
   133  
   134  	return r0, r1
   135  }
   136  
   137  type mockConstructorTestingTNewEvents interface {
   138  	mock.TestingT
   139  	Cleanup(func())
   140  }
   141  
   142  // NewEvents creates a new instance of Events. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   143  func NewEvents(t mockConstructorTestingTNewEvents) *Events {
   144  	mock := &Events{}
   145  	mock.Mock.Test(t)
   146  
   147  	t.Cleanup(func() { mock.AssertExpectations(t) })
   148  
   149  	return mock
   150  }