github.com/koko1123/flow-go-1@v0.29.6/storage/mock/chunks_queue.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 chunks "github.com/koko1123/flow-go-1/model/chunks" 7 mock "github.com/stretchr/testify/mock" 8 ) 9 10 // ChunksQueue is an autogenerated mock type for the ChunksQueue type 11 type ChunksQueue struct { 12 mock.Mock 13 } 14 15 // AtIndex provides a mock function with given fields: index 16 func (_m *ChunksQueue) AtIndex(index uint64) (*chunks.Locator, error) { 17 ret := _m.Called(index) 18 19 var r0 *chunks.Locator 20 if rf, ok := ret.Get(0).(func(uint64) *chunks.Locator); ok { 21 r0 = rf(index) 22 } else { 23 if ret.Get(0) != nil { 24 r0 = ret.Get(0).(*chunks.Locator) 25 } 26 } 27 28 var r1 error 29 if rf, ok := ret.Get(1).(func(uint64) error); ok { 30 r1 = rf(index) 31 } else { 32 r1 = ret.Error(1) 33 } 34 35 return r0, r1 36 } 37 38 // LatestIndex provides a mock function with given fields: 39 func (_m *ChunksQueue) LatestIndex() (uint64, error) { 40 ret := _m.Called() 41 42 var r0 uint64 43 if rf, ok := ret.Get(0).(func() uint64); ok { 44 r0 = rf() 45 } else { 46 r0 = ret.Get(0).(uint64) 47 } 48 49 var r1 error 50 if rf, ok := ret.Get(1).(func() error); ok { 51 r1 = rf() 52 } else { 53 r1 = ret.Error(1) 54 } 55 56 return r0, r1 57 } 58 59 // StoreChunkLocator provides a mock function with given fields: locator 60 func (_m *ChunksQueue) StoreChunkLocator(locator *chunks.Locator) (bool, error) { 61 ret := _m.Called(locator) 62 63 var r0 bool 64 if rf, ok := ret.Get(0).(func(*chunks.Locator) bool); ok { 65 r0 = rf(locator) 66 } else { 67 r0 = ret.Get(0).(bool) 68 } 69 70 var r1 error 71 if rf, ok := ret.Get(1).(func(*chunks.Locator) error); ok { 72 r1 = rf(locator) 73 } else { 74 r1 = ret.Error(1) 75 } 76 77 return r0, r1 78 } 79 80 type mockConstructorTestingTNewChunksQueue interface { 81 mock.TestingT 82 Cleanup(func()) 83 } 84 85 // NewChunksQueue creates a new instance of ChunksQueue. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 86 func NewChunksQueue(t mockConstructorTestingTNewChunksQueue) *ChunksQueue { 87 mock := &ChunksQueue{} 88 mock.Mock.Test(t) 89 90 t.Cleanup(func() { mock.AssertExpectations(t) }) 91 92 return mock 93 }