// Code generated by mockery v2.53.5. DO NOT EDIT. package artifactcache import ( http "net/http" bolthold "github.com/timshannon/bolthold" io "io" mock "github.com/stretchr/testify/mock" time "time" ) // mockCaches is an autogenerated mock type for the caches type type mockCaches struct { mock.Mock } // close provides a mock function with no fields func (_m *mockCaches) close() { _m.Called() } // commit provides a mock function with given fields: id, size func (_m *mockCaches) commit(id uint64, size int64) (int64, error) { ret := _m.Called(id, size) if len(ret) == 0 { panic("no return value specified for commit") } var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(uint64, int64) (int64, error)); ok { return rf(id, size) } if rf, ok := ret.Get(0).(func(uint64, int64) int64); ok { r0 = rf(id, size) } else { r0 = ret.Get(0).(int64) } if rf, ok := ret.Get(1).(func(uint64, int64) error); ok { r1 = rf(id, size) } else { r1 = ret.Error(1) } return r0, r1 } // exist provides a mock function with given fields: id func (_m *mockCaches) exist(id uint64) (bool, error) { ret := _m.Called(id) if len(ret) == 0 { panic("no return value specified for exist") } var r0 bool var r1 error if rf, ok := ret.Get(0).(func(uint64) (bool, error)); ok { return rf(id) } if rf, ok := ret.Get(0).(func(uint64) bool); ok { r0 = rf(id) } else { r0 = ret.Get(0).(bool) } if rf, ok := ret.Get(1).(func(uint64) error); ok { r1 = rf(id) } else { r1 = ret.Error(1) } return r0, r1 } // gcCache provides a mock function with no fields func (_m *mockCaches) gcCache() { _m.Called() } // getDB provides a mock function with no fields func (_m *mockCaches) getDB() *bolthold.Store { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for getDB") } var r0 *bolthold.Store if rf, ok := ret.Get(0).(func() *bolthold.Store); ok { r0 = rf() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*bolthold.Store) } } return r0 } // readCache provides a mock function with given fields: id, repo func (_m *mockCaches) readCache(id uint64, repo string) (*Cache, error) { ret := _m.Called(id, repo) if len(ret) == 0 { panic("no return value specified for readCache") } var r0 *Cache var r1 error if rf, ok := ret.Get(0).(func(uint64, string) (*Cache, error)); ok { return rf(id, repo) } if rf, ok := ret.Get(0).(func(uint64, string) *Cache); ok { r0 = rf(id, repo) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*Cache) } } if rf, ok := ret.Get(1).(func(uint64, string) error); ok { r1 = rf(id, repo) } else { r1 = ret.Error(1) } return r0, r1 } // serve provides a mock function with given fields: w, r, id func (_m *mockCaches) serve(w http.ResponseWriter, r *http.Request, id uint64) { _m.Called(w, r, id) } // setgcAt provides a mock function with given fields: at func (_m *mockCaches) setgcAt(at time.Time) { _m.Called(at) } // useCache provides a mock function with given fields: id func (_m *mockCaches) useCache(id uint64) error { ret := _m.Called(id) if len(ret) == 0 { panic("no return value specified for useCache") } var r0 error if rf, ok := ret.Get(0).(func(uint64) error); ok { r0 = rf(id) } else { r0 = ret.Error(0) } return r0 } // validateMac provides a mock function with given fields: rundata func (_m *mockCaches) validateMac(rundata RunData) (string, error) { ret := _m.Called(rundata) if len(ret) == 0 { panic("no return value specified for validateMac") } var r0 string var r1 error if rf, ok := ret.Get(0).(func(RunData) (string, error)); ok { return rf(rundata) } if rf, ok := ret.Get(0).(func(RunData) string); ok { r0 = rf(rundata) } else { r0 = ret.Get(0).(string) } if rf, ok := ret.Get(1).(func(RunData) error); ok { r1 = rf(rundata) } else { r1 = ret.Error(1) } return r0, r1 } // write provides a mock function with given fields: id, offset, reader func (_m *mockCaches) write(id uint64, offset uint64, reader io.Reader) error { ret := _m.Called(id, offset, reader) if len(ret) == 0 { panic("no return value specified for write") } var r0 error if rf, ok := ret.Get(0).(func(uint64, uint64, io.Reader) error); ok { r0 = rf(id, offset, reader) } else { r0 = ret.Error(0) } return r0 } // newMockCaches creates a new instance of mockCaches. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func newMockCaches(t interface { mock.TestingT Cleanup(func()) }, ) *mockCaches { mock := &mockCaches{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }