github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/storage/mock/events.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 flow "github.com/onflow/flow-go/model/flow" 7 mock "github.com/stretchr/testify/mock" 8 9 storage "github.com/onflow/flow-go/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 var r1 error 51 if rf, ok := ret.Get(0).(func(flow.Identifier) ([]flow.Event, error)); ok { 52 return rf(blockID) 53 } 54 if rf, ok := ret.Get(0).(func(flow.Identifier) []flow.Event); ok { 55 r0 = rf(blockID) 56 } else { 57 if ret.Get(0) != nil { 58 r0 = ret.Get(0).([]flow.Event) 59 } 60 } 61 62 if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok { 63 r1 = rf(blockID) 64 } else { 65 r1 = ret.Error(1) 66 } 67 68 return r0, r1 69 } 70 71 // ByBlockIDEventType provides a mock function with given fields: blockID, eventType 72 func (_m *Events) ByBlockIDEventType(blockID flow.Identifier, eventType flow.EventType) ([]flow.Event, error) { 73 ret := _m.Called(blockID, eventType) 74 75 var r0 []flow.Event 76 var r1 error 77 if rf, ok := ret.Get(0).(func(flow.Identifier, flow.EventType) ([]flow.Event, error)); ok { 78 return rf(blockID, eventType) 79 } 80 if rf, ok := ret.Get(0).(func(flow.Identifier, flow.EventType) []flow.Event); ok { 81 r0 = rf(blockID, eventType) 82 } else { 83 if ret.Get(0) != nil { 84 r0 = ret.Get(0).([]flow.Event) 85 } 86 } 87 88 if rf, ok := ret.Get(1).(func(flow.Identifier, flow.EventType) error); ok { 89 r1 = rf(blockID, eventType) 90 } else { 91 r1 = ret.Error(1) 92 } 93 94 return r0, r1 95 } 96 97 // ByBlockIDTransactionID provides a mock function with given fields: blockID, transactionID 98 func (_m *Events) ByBlockIDTransactionID(blockID flow.Identifier, transactionID flow.Identifier) ([]flow.Event, error) { 99 ret := _m.Called(blockID, transactionID) 100 101 var r0 []flow.Event 102 var r1 error 103 if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) ([]flow.Event, error)); ok { 104 return rf(blockID, transactionID) 105 } 106 if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) []flow.Event); ok { 107 r0 = rf(blockID, transactionID) 108 } else { 109 if ret.Get(0) != nil { 110 r0 = ret.Get(0).([]flow.Event) 111 } 112 } 113 114 if rf, ok := ret.Get(1).(func(flow.Identifier, flow.Identifier) error); ok { 115 r1 = rf(blockID, transactionID) 116 } else { 117 r1 = ret.Error(1) 118 } 119 120 return r0, r1 121 } 122 123 // ByBlockIDTransactionIndex provides a mock function with given fields: blockID, txIndex 124 func (_m *Events) ByBlockIDTransactionIndex(blockID flow.Identifier, txIndex uint32) ([]flow.Event, error) { 125 ret := _m.Called(blockID, txIndex) 126 127 var r0 []flow.Event 128 var r1 error 129 if rf, ok := ret.Get(0).(func(flow.Identifier, uint32) ([]flow.Event, error)); ok { 130 return rf(blockID, txIndex) 131 } 132 if rf, ok := ret.Get(0).(func(flow.Identifier, uint32) []flow.Event); ok { 133 r0 = rf(blockID, txIndex) 134 } else { 135 if ret.Get(0) != nil { 136 r0 = ret.Get(0).([]flow.Event) 137 } 138 } 139 140 if rf, ok := ret.Get(1).(func(flow.Identifier, uint32) error); ok { 141 r1 = rf(blockID, txIndex) 142 } else { 143 r1 = ret.Error(1) 144 } 145 146 return r0, r1 147 } 148 149 // Store provides a mock function with given fields: blockID, blockEvents 150 func (_m *Events) Store(blockID flow.Identifier, blockEvents []flow.EventsList) error { 151 ret := _m.Called(blockID, blockEvents) 152 153 var r0 error 154 if rf, ok := ret.Get(0).(func(flow.Identifier, []flow.EventsList) error); ok { 155 r0 = rf(blockID, blockEvents) 156 } else { 157 r0 = ret.Error(0) 158 } 159 160 return r0 161 } 162 163 type mockConstructorTestingTNewEvents interface { 164 mock.TestingT 165 Cleanup(func()) 166 } 167 168 // 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. 169 func NewEvents(t mockConstructorTestingTNewEvents) *Events { 170 mock := &Events{} 171 mock.Mock.Test(t) 172 173 t.Cleanup(func() { mock.AssertExpectations(t) }) 174 175 return mock 176 }