// 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" ) // NewMirrorStore creates a new instance of MirrorStore. 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 NewMirrorStore(t interface { mock.TestingT Cleanup(func()) }) *MirrorStore { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MirrorStore{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MirrorStore is an autogenerated mock type for the MirrorStore type type MirrorStore struct { mock.Mock } type MirrorStore_Expecter struct { mock *mock.Mock } func (_m *MirrorStore) EXPECT() *MirrorStore_Expecter { return &MirrorStore_Expecter{mock: &_m.Mock} } // DeleteRepoConfig provides a mock function for the type MirrorStore func (_mock *MirrorStore) DeleteRepoConfig(ctx context.Context, repo domain.RepoName) error { ret := _mock.Called(ctx, repo) if len(ret) == 0 { panic("no return value specified for DeleteRepoConfig") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) error); ok { r0 = returnFunc(ctx, repo) } else { r0 = ret.Error(0) } return r0 } // MirrorStore_DeleteRepoConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRepoConfig' type MirrorStore_DeleteRepoConfig_Call struct { *mock.Call } // DeleteRepoConfig is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName func (_e *MirrorStore_Expecter) DeleteRepoConfig(ctx any, repo any) *MirrorStore_DeleteRepoConfig_Call { return &MirrorStore_DeleteRepoConfig_Call{Call: _e.mock.On("DeleteRepoConfig", ctx, repo)} } func (_c *MirrorStore_DeleteRepoConfig_Call) Run(run func(ctx context.Context, repo domain.RepoName)) *MirrorStore_DeleteRepoConfig_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 *MirrorStore_DeleteRepoConfig_Call) Return(err error) *MirrorStore_DeleteRepoConfig_Call { _c.Call.Return(err) return _c } func (_c *MirrorStore_DeleteRepoConfig_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName) error) *MirrorStore_DeleteRepoConfig_Call { _c.Call.Return(run) return _c } // GetGlobal provides a mock function for the type MirrorStore func (_mock *MirrorStore) GetGlobal(ctx context.Context) (domain.MirrorGlobalConfig, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for GetGlobal") } var r0 domain.MirrorGlobalConfig var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) (domain.MirrorGlobalConfig, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) domain.MirrorGlobalConfig); ok { r0 = returnFunc(ctx) } else { r0 = ret.Get(0).(domain.MirrorGlobalConfig) } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // MirrorStore_GetGlobal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGlobal' type MirrorStore_GetGlobal_Call struct { *mock.Call } // GetGlobal is a helper method to define mock.On call // - ctx context.Context func (_e *MirrorStore_Expecter) GetGlobal(ctx any) *MirrorStore_GetGlobal_Call { return &MirrorStore_GetGlobal_Call{Call: _e.mock.On("GetGlobal", ctx)} } func (_c *MirrorStore_GetGlobal_Call) Run(run func(ctx context.Context)) *MirrorStore_GetGlobal_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 *MirrorStore_GetGlobal_Call) Return(mirrorGlobalConfig domain.MirrorGlobalConfig, err error) *MirrorStore_GetGlobal_Call { _c.Call.Return(mirrorGlobalConfig, err) return _c } func (_c *MirrorStore_GetGlobal_Call) RunAndReturn(run func(ctx context.Context) (domain.MirrorGlobalConfig, error)) *MirrorStore_GetGlobal_Call { _c.Call.Return(run) return _c } // GetRepoConfig provides a mock function for the type MirrorStore func (_mock *MirrorStore) GetRepoConfig(ctx context.Context, repo domain.RepoName) (domain.MirrorRepoConfig, error) { ret := _mock.Called(ctx, repo) if len(ret) == 0 { panic("no return value specified for GetRepoConfig") } var r0 domain.MirrorRepoConfig var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) (domain.MirrorRepoConfig, error)); ok { return returnFunc(ctx, repo) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) domain.MirrorRepoConfig); ok { r0 = returnFunc(ctx, repo) } else { r0 = ret.Get(0).(domain.MirrorRepoConfig) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName) error); ok { r1 = returnFunc(ctx, repo) } else { r1 = ret.Error(1) } return r0, r1 } // MirrorStore_GetRepoConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRepoConfig' type MirrorStore_GetRepoConfig_Call struct { *mock.Call } // GetRepoConfig is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName func (_e *MirrorStore_Expecter) GetRepoConfig(ctx any, repo any) *MirrorStore_GetRepoConfig_Call { return &MirrorStore_GetRepoConfig_Call{Call: _e.mock.On("GetRepoConfig", ctx, repo)} } func (_c *MirrorStore_GetRepoConfig_Call) Run(run func(ctx context.Context, repo domain.RepoName)) *MirrorStore_GetRepoConfig_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 *MirrorStore_GetRepoConfig_Call) Return(mirrorRepoConfig domain.MirrorRepoConfig, err error) *MirrorStore_GetRepoConfig_Call { _c.Call.Return(mirrorRepoConfig, err) return _c } func (_c *MirrorStore_GetRepoConfig_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName) (domain.MirrorRepoConfig, error)) *MirrorStore_GetRepoConfig_Call { _c.Call.Return(run) return _c } // GetSnapshot provides a mock function for the type MirrorStore func (_mock *MirrorStore) GetSnapshot(ctx context.Context, repo domain.RepoName) (domain.MirrorSnapshot, error) { ret := _mock.Called(ctx, repo) if len(ret) == 0 { panic("no return value specified for GetSnapshot") } var r0 domain.MirrorSnapshot var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) (domain.MirrorSnapshot, error)); ok { return returnFunc(ctx, repo) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) domain.MirrorSnapshot); ok { r0 = returnFunc(ctx, repo) } else { r0 = ret.Get(0).(domain.MirrorSnapshot) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName) error); ok { r1 = returnFunc(ctx, repo) } else { r1 = ret.Error(1) } return r0, r1 } // MirrorStore_GetSnapshot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSnapshot' type MirrorStore_GetSnapshot_Call struct { *mock.Call } // GetSnapshot is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName func (_e *MirrorStore_Expecter) GetSnapshot(ctx any, repo any) *MirrorStore_GetSnapshot_Call { return &MirrorStore_GetSnapshot_Call{Call: _e.mock.On("GetSnapshot", ctx, repo)} } func (_c *MirrorStore_GetSnapshot_Call) Run(run func(ctx context.Context, repo domain.RepoName)) *MirrorStore_GetSnapshot_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 *MirrorStore_GetSnapshot_Call) Return(mirrorSnapshot domain.MirrorSnapshot, err error) *MirrorStore_GetSnapshot_Call { _c.Call.Return(mirrorSnapshot, err) return _c } func (_c *MirrorStore_GetSnapshot_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName) (domain.MirrorSnapshot, error)) *MirrorStore_GetSnapshot_Call { _c.Call.Return(run) return _c } // GetStatus provides a mock function for the type MirrorStore func (_mock *MirrorStore) GetStatus(ctx context.Context, repo domain.RepoName) (domain.MirrorStatus, error) { ret := _mock.Called(ctx, repo) if len(ret) == 0 { panic("no return value specified for GetStatus") } var r0 domain.MirrorStatus var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) (domain.MirrorStatus, error)); ok { return returnFunc(ctx, repo) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) domain.MirrorStatus); ok { r0 = returnFunc(ctx, repo) } else { r0 = ret.Get(0).(domain.MirrorStatus) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName) error); ok { r1 = returnFunc(ctx, repo) } else { r1 = ret.Error(1) } return r0, r1 } // MirrorStore_GetStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatus' type MirrorStore_GetStatus_Call struct { *mock.Call } // GetStatus is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName func (_e *MirrorStore_Expecter) GetStatus(ctx any, repo any) *MirrorStore_GetStatus_Call { return &MirrorStore_GetStatus_Call{Call: _e.mock.On("GetStatus", ctx, repo)} } func (_c *MirrorStore_GetStatus_Call) Run(run func(ctx context.Context, repo domain.RepoName)) *MirrorStore_GetStatus_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 *MirrorStore_GetStatus_Call) Return(mirrorStatus domain.MirrorStatus, err error) *MirrorStore_GetStatus_Call { _c.Call.Return(mirrorStatus, err) return _c } func (_c *MirrorStore_GetStatus_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName) (domain.MirrorStatus, error)) *MirrorStore_GetStatus_Call { _c.Call.Return(run) return _c } // ListRepoConfigs provides a mock function for the type MirrorStore func (_mock *MirrorStore) ListRepoConfigs(ctx context.Context) ([]domain.MirrorRepoConfig, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for ListRepoConfigs") } var r0 []domain.MirrorRepoConfig var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) ([]domain.MirrorRepoConfig, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) []domain.MirrorRepoConfig); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]domain.MirrorRepoConfig) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // MirrorStore_ListRepoConfigs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRepoConfigs' type MirrorStore_ListRepoConfigs_Call struct { *mock.Call } // ListRepoConfigs is a helper method to define mock.On call // - ctx context.Context func (_e *MirrorStore_Expecter) ListRepoConfigs(ctx any) *MirrorStore_ListRepoConfigs_Call { return &MirrorStore_ListRepoConfigs_Call{Call: _e.mock.On("ListRepoConfigs", ctx)} } func (_c *MirrorStore_ListRepoConfigs_Call) Run(run func(ctx context.Context)) *MirrorStore_ListRepoConfigs_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 *MirrorStore_ListRepoConfigs_Call) Return(mirrorRepoConfigs []domain.MirrorRepoConfig, err error) *MirrorStore_ListRepoConfigs_Call { _c.Call.Return(mirrorRepoConfigs, err) return _c } func (_c *MirrorStore_ListRepoConfigs_Call) RunAndReturn(run func(ctx context.Context) ([]domain.MirrorRepoConfig, error)) *MirrorStore_ListRepoConfigs_Call { _c.Call.Return(run) return _c } // ListStatus provides a mock function for the type MirrorStore func (_mock *MirrorStore) ListStatus(ctx context.Context) ([]domain.MirrorStatus, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for ListStatus") } var r0 []domain.MirrorStatus var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) ([]domain.MirrorStatus, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) []domain.MirrorStatus); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]domain.MirrorStatus) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // MirrorStore_ListStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListStatus' type MirrorStore_ListStatus_Call struct { *mock.Call } // ListStatus is a helper method to define mock.On call // - ctx context.Context func (_e *MirrorStore_Expecter) ListStatus(ctx any) *MirrorStore_ListStatus_Call { return &MirrorStore_ListStatus_Call{Call: _e.mock.On("ListStatus", ctx)} } func (_c *MirrorStore_ListStatus_Call) Run(run func(ctx context.Context)) *MirrorStore_ListStatus_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 *MirrorStore_ListStatus_Call) Return(mirrorStatuss []domain.MirrorStatus, err error) *MirrorStore_ListStatus_Call { _c.Call.Return(mirrorStatuss, err) return _c } func (_c *MirrorStore_ListStatus_Call) RunAndReturn(run func(ctx context.Context) ([]domain.MirrorStatus, error)) *MirrorStore_ListStatus_Call { _c.Call.Return(run) return _c } // PutGlobal provides a mock function for the type MirrorStore func (_mock *MirrorStore) PutGlobal(ctx context.Context, g domain.MirrorGlobalConfig) error { ret := _mock.Called(ctx, g) if len(ret) == 0 { panic("no return value specified for PutGlobal") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.MirrorGlobalConfig) error); ok { r0 = returnFunc(ctx, g) } else { r0 = ret.Error(0) } return r0 } // MirrorStore_PutGlobal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutGlobal' type MirrorStore_PutGlobal_Call struct { *mock.Call } // PutGlobal is a helper method to define mock.On call // - ctx context.Context // - g domain.MirrorGlobalConfig func (_e *MirrorStore_Expecter) PutGlobal(ctx any, g any) *MirrorStore_PutGlobal_Call { return &MirrorStore_PutGlobal_Call{Call: _e.mock.On("PutGlobal", ctx, g)} } func (_c *MirrorStore_PutGlobal_Call) Run(run func(ctx context.Context, g domain.MirrorGlobalConfig)) *MirrorStore_PutGlobal_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.MirrorGlobalConfig if args[1] != nil { arg1 = args[1].(domain.MirrorGlobalConfig) } run( arg0, arg1, ) }) return _c } func (_c *MirrorStore_PutGlobal_Call) Return(err error) *MirrorStore_PutGlobal_Call { _c.Call.Return(err) return _c } func (_c *MirrorStore_PutGlobal_Call) RunAndReturn(run func(ctx context.Context, g domain.MirrorGlobalConfig) error) *MirrorStore_PutGlobal_Call { _c.Call.Return(run) return _c } // PutRepoConfig provides a mock function for the type MirrorStore func (_mock *MirrorStore) PutRepoConfig(ctx context.Context, c domain.MirrorRepoConfig) error { ret := _mock.Called(ctx, c) if len(ret) == 0 { panic("no return value specified for PutRepoConfig") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.MirrorRepoConfig) error); ok { r0 = returnFunc(ctx, c) } else { r0 = ret.Error(0) } return r0 } // MirrorStore_PutRepoConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutRepoConfig' type MirrorStore_PutRepoConfig_Call struct { *mock.Call } // PutRepoConfig is a helper method to define mock.On call // - ctx context.Context // - c domain.MirrorRepoConfig func (_e *MirrorStore_Expecter) PutRepoConfig(ctx any, c any) *MirrorStore_PutRepoConfig_Call { return &MirrorStore_PutRepoConfig_Call{Call: _e.mock.On("PutRepoConfig", ctx, c)} } func (_c *MirrorStore_PutRepoConfig_Call) Run(run func(ctx context.Context, c domain.MirrorRepoConfig)) *MirrorStore_PutRepoConfig_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.MirrorRepoConfig if args[1] != nil { arg1 = args[1].(domain.MirrorRepoConfig) } run( arg0, arg1, ) }) return _c } func (_c *MirrorStore_PutRepoConfig_Call) Return(err error) *MirrorStore_PutRepoConfig_Call { _c.Call.Return(err) return _c } func (_c *MirrorStore_PutRepoConfig_Call) RunAndReturn(run func(ctx context.Context, c domain.MirrorRepoConfig) error) *MirrorStore_PutRepoConfig_Call { _c.Call.Return(run) return _c } // PutSnapshot provides a mock function for the type MirrorStore func (_mock *MirrorStore) PutSnapshot(ctx context.Context, repo domain.RepoName, s domain.MirrorSnapshot) error { ret := _mock.Called(ctx, repo, s) if len(ret) == 0 { panic("no return value specified for PutSnapshot") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.MirrorSnapshot) error); ok { r0 = returnFunc(ctx, repo, s) } else { r0 = ret.Error(0) } return r0 } // MirrorStore_PutSnapshot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutSnapshot' type MirrorStore_PutSnapshot_Call struct { *mock.Call } // PutSnapshot is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName // - s domain.MirrorSnapshot func (_e *MirrorStore_Expecter) PutSnapshot(ctx any, repo any, s any) *MirrorStore_PutSnapshot_Call { return &MirrorStore_PutSnapshot_Call{Call: _e.mock.On("PutSnapshot", ctx, repo, s)} } func (_c *MirrorStore_PutSnapshot_Call) Run(run func(ctx context.Context, repo domain.RepoName, s domain.MirrorSnapshot)) *MirrorStore_PutSnapshot_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) } var arg2 domain.MirrorSnapshot if args[2] != nil { arg2 = args[2].(domain.MirrorSnapshot) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MirrorStore_PutSnapshot_Call) Return(err error) *MirrorStore_PutSnapshot_Call { _c.Call.Return(err) return _c } func (_c *MirrorStore_PutSnapshot_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, s domain.MirrorSnapshot) error) *MirrorStore_PutSnapshot_Call { _c.Call.Return(run) return _c } // PutStatus provides a mock function for the type MirrorStore func (_mock *MirrorStore) PutStatus(ctx context.Context, s domain.MirrorStatus) error { ret := _mock.Called(ctx, s) if len(ret) == 0 { panic("no return value specified for PutStatus") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.MirrorStatus) error); ok { r0 = returnFunc(ctx, s) } else { r0 = ret.Error(0) } return r0 } // MirrorStore_PutStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutStatus' type MirrorStore_PutStatus_Call struct { *mock.Call } // PutStatus is a helper method to define mock.On call // - ctx context.Context // - s domain.MirrorStatus func (_e *MirrorStore_Expecter) PutStatus(ctx any, s any) *MirrorStore_PutStatus_Call { return &MirrorStore_PutStatus_Call{Call: _e.mock.On("PutStatus", ctx, s)} } func (_c *MirrorStore_PutStatus_Call) Run(run func(ctx context.Context, s domain.MirrorStatus)) *MirrorStore_PutStatus_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.MirrorStatus if args[1] != nil { arg1 = args[1].(domain.MirrorStatus) } run( arg0, arg1, ) }) return _c } func (_c *MirrorStore_PutStatus_Call) Return(err error) *MirrorStore_PutStatus_Call { _c.Call.Return(err) return _c } func (_c *MirrorStore_PutStatus_Call) RunAndReturn(run func(ctx context.Context, s domain.MirrorStatus) error) *MirrorStore_PutStatus_Call { _c.Call.Return(run) return _c }