// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "bnema.dev/ermite/internal/domain" mock "github.com/stretchr/testify/mock" ) // NewRepoMetaStore creates a new instance of RepoMetaStore. 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 NewRepoMetaStore(t interface { mock.TestingT Cleanup(func()) }) *RepoMetaStore { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &RepoMetaStore{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // RepoMetaStore is an autogenerated mock type for the RepoMetaStore type type RepoMetaStore struct { mock.Mock } type RepoMetaStore_Expecter struct { mock *mock.Mock } func (_m *RepoMetaStore) EXPECT() *RepoMetaStore_Expecter { return &RepoMetaStore_Expecter{mock: &_m.Mock} } // Create provides a mock function for the type RepoMetaStore func (_mock *RepoMetaStore) Create(ctx context.Context, repo domain.Repo) error { ret := _mock.Called(ctx, repo) if len(ret) == 0 { panic("no return value specified for Create") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Repo) error); ok { r0 = returnFunc(ctx, repo) } else { r0 = ret.Error(0) } return r0 } // RepoMetaStore_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' type RepoMetaStore_Create_Call struct { *mock.Call } // Create is a helper method to define mock.On call // - ctx context.Context // - repo domain.Repo func (_e *RepoMetaStore_Expecter) Create(ctx any, repo any) *RepoMetaStore_Create_Call { return &RepoMetaStore_Create_Call{Call: _e.mock.On("Create", ctx, repo)} } func (_c *RepoMetaStore_Create_Call) Run(run func(ctx context.Context, repo domain.Repo)) *RepoMetaStore_Create_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Repo if args[1] != nil { arg1 = args[1].(domain.Repo) } run( arg0, arg1, ) }) return _c } func (_c *RepoMetaStore_Create_Call) Return(err error) *RepoMetaStore_Create_Call { _c.Call.Return(err) return _c } func (_c *RepoMetaStore_Create_Call) RunAndReturn(run func(ctx context.Context, repo domain.Repo) error) *RepoMetaStore_Create_Call { _c.Call.Return(run) return _c } // Delete provides a mock function for the type RepoMetaStore func (_mock *RepoMetaStore) Delete(ctx context.Context, name domain.RepoName) error { ret := _mock.Called(ctx, name) if len(ret) == 0 { panic("no return value specified for Delete") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) error); ok { r0 = returnFunc(ctx, name) } else { r0 = ret.Error(0) } return r0 } // RepoMetaStore_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' type RepoMetaStore_Delete_Call struct { *mock.Call } // Delete is a helper method to define mock.On call // - ctx context.Context // - name domain.RepoName func (_e *RepoMetaStore_Expecter) Delete(ctx any, name any) *RepoMetaStore_Delete_Call { return &RepoMetaStore_Delete_Call{Call: _e.mock.On("Delete", ctx, name)} } func (_c *RepoMetaStore_Delete_Call) Run(run func(ctx context.Context, name domain.RepoName)) *RepoMetaStore_Delete_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.RepoName if args[1] != nil { arg1 = args[1].(domain.RepoName) } run( arg0, arg1, ) }) return _c } func (_c *RepoMetaStore_Delete_Call) Return(err error) *RepoMetaStore_Delete_Call { _c.Call.Return(err) return _c } func (_c *RepoMetaStore_Delete_Call) RunAndReturn(run func(ctx context.Context, name domain.RepoName) error) *RepoMetaStore_Delete_Call { _c.Call.Return(run) return _c } // Get provides a mock function for the type RepoMetaStore func (_mock *RepoMetaStore) Get(ctx context.Context, name domain.RepoName) (domain.Repo, error) { ret := _mock.Called(ctx, name) if len(ret) == 0 { panic("no return value specified for Get") } var r0 domain.Repo var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) (domain.Repo, error)); ok { return returnFunc(ctx, name) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) domain.Repo); ok { r0 = returnFunc(ctx, name) } else { r0 = ret.Get(0).(domain.Repo) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName) error); ok { r1 = returnFunc(ctx, name) } else { r1 = ret.Error(1) } return r0, r1 } // RepoMetaStore_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' type RepoMetaStore_Get_Call struct { *mock.Call } // Get is a helper method to define mock.On call // - ctx context.Context // - name domain.RepoName func (_e *RepoMetaStore_Expecter) Get(ctx any, name any) *RepoMetaStore_Get_Call { return &RepoMetaStore_Get_Call{Call: _e.mock.On("Get", ctx, name)} } func (_c *RepoMetaStore_Get_Call) Run(run func(ctx context.Context, name domain.RepoName)) *RepoMetaStore_Get_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.RepoName if args[1] != nil { arg1 = args[1].(domain.RepoName) } run( arg0, arg1, ) }) return _c } func (_c *RepoMetaStore_Get_Call) Return(repo domain.Repo, err error) *RepoMetaStore_Get_Call { _c.Call.Return(repo, err) return _c } func (_c *RepoMetaStore_Get_Call) RunAndReturn(run func(ctx context.Context, name domain.RepoName) (domain.Repo, error)) *RepoMetaStore_Get_Call { _c.Call.Return(run) return _c } // List provides a mock function for the type RepoMetaStore func (_mock *RepoMetaStore) List(ctx context.Context) ([]domain.Repo, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for List") } var r0 []domain.Repo var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) ([]domain.Repo, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) []domain.Repo); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]domain.Repo) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // RepoMetaStore_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' type RepoMetaStore_List_Call struct { *mock.Call } // List is a helper method to define mock.On call // - ctx context.Context func (_e *RepoMetaStore_Expecter) List(ctx any) *RepoMetaStore_List_Call { return &RepoMetaStore_List_Call{Call: _e.mock.On("List", ctx)} } func (_c *RepoMetaStore_List_Call) Run(run func(ctx context.Context)) *RepoMetaStore_List_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *RepoMetaStore_List_Call) Return(repos []domain.Repo, err error) *RepoMetaStore_List_Call { _c.Call.Return(repos, err) return _c } func (_c *RepoMetaStore_List_Call) RunAndReturn(run func(ctx context.Context) ([]domain.Repo, error)) *RepoMetaStore_List_Call { _c.Call.Return(run) return _c } // Update provides a mock function for the type RepoMetaStore func (_mock *RepoMetaStore) Update(ctx context.Context, repo domain.Repo) error { ret := _mock.Called(ctx, repo) if len(ret) == 0 { panic("no return value specified for Update") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Repo) error); ok { r0 = returnFunc(ctx, repo) } else { r0 = ret.Error(0) } return r0 } // RepoMetaStore_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' type RepoMetaStore_Update_Call struct { *mock.Call } // Update is a helper method to define mock.On call // - ctx context.Context // - repo domain.Repo func (_e *RepoMetaStore_Expecter) Update(ctx any, repo any) *RepoMetaStore_Update_Call { return &RepoMetaStore_Update_Call{Call: _e.mock.On("Update", ctx, repo)} } func (_c *RepoMetaStore_Update_Call) Run(run func(ctx context.Context, repo domain.Repo)) *RepoMetaStore_Update_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Repo if args[1] != nil { arg1 = args[1].(domain.Repo) } run( arg0, arg1, ) }) return _c } func (_c *RepoMetaStore_Update_Call) Return(err error) *RepoMetaStore_Update_Call { _c.Call.Return(err) return _c } func (_c *RepoMetaStore_Update_Call) RunAndReturn(run func(ctx context.Context, repo domain.Repo) error) *RepoMetaStore_Update_Call { _c.Call.Return(run) return _c }