// Code generated by mockery. DO NOT EDIT. package biz import ( context "context" biz "github.com/tnb-labs/panel/internal/biz" mock "github.com/stretchr/testify/mock" request "github.com/tnb-labs/panel/internal/http/request" ) // SettingRepo is an autogenerated mock type for the SettingRepo type type SettingRepo struct { mock.Mock } type SettingRepo_Expecter struct { mock *mock.Mock } func (_m *SettingRepo) EXPECT() *SettingRepo_Expecter { return &SettingRepo_Expecter{mock: &_m.Mock} } // Delete provides a mock function with given fields: key func (_m *SettingRepo) Delete(key biz.SettingKey) error { ret := _m.Called(key) if len(ret) == 0 { panic("no return value specified for Delete") } var r0 error if rf, ok := ret.Get(0).(func(biz.SettingKey) error); ok { r0 = rf(key) } else { r0 = ret.Error(0) } return r0 } // SettingRepo_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' type SettingRepo_Delete_Call struct { *mock.Call } // Delete is a helper method to define mock.On call // - key biz.SettingKey func (_e *SettingRepo_Expecter) Delete(key interface{}) *SettingRepo_Delete_Call { return &SettingRepo_Delete_Call{Call: _e.mock.On("Delete", key)} } func (_c *SettingRepo_Delete_Call) Run(run func(key biz.SettingKey)) *SettingRepo_Delete_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(biz.SettingKey)) }) return _c } func (_c *SettingRepo_Delete_Call) Return(_a0 error) *SettingRepo_Delete_Call { _c.Call.Return(_a0) return _c } func (_c *SettingRepo_Delete_Call) RunAndReturn(run func(biz.SettingKey) error) *SettingRepo_Delete_Call { _c.Call.Return(run) return _c } // Get provides a mock function with given fields: key, defaultValue func (_m *SettingRepo) Get(key biz.SettingKey, defaultValue ...string) (string, error) { _va := make([]interface{}, len(defaultValue)) for _i := range defaultValue { _va[_i] = defaultValue[_i] } var _ca []interface{} _ca = append(_ca, key) _ca = append(_ca, _va...) ret := _m.Called(_ca...) if len(ret) == 0 { panic("no return value specified for Get") } var r0 string var r1 error if rf, ok := ret.Get(0).(func(biz.SettingKey, ...string) (string, error)); ok { return rf(key, defaultValue...) } if rf, ok := ret.Get(0).(func(biz.SettingKey, ...string) string); ok { r0 = rf(key, defaultValue...) } else { r0 = ret.Get(0).(string) } if rf, ok := ret.Get(1).(func(biz.SettingKey, ...string) error); ok { r1 = rf(key, defaultValue...) } else { r1 = ret.Error(1) } return r0, r1 } // SettingRepo_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' type SettingRepo_Get_Call struct { *mock.Call } // Get is a helper method to define mock.On call // - key biz.SettingKey // - defaultValue ...string func (_e *SettingRepo_Expecter) Get(key interface{}, defaultValue ...interface{}) *SettingRepo_Get_Call { return &SettingRepo_Get_Call{Call: _e.mock.On("Get", append([]interface{}{key}, defaultValue...)...)} } func (_c *SettingRepo_Get_Call) Run(run func(key biz.SettingKey, defaultValue ...string)) *SettingRepo_Get_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]string, len(args)-1) for i, a := range args[1:] { if a != nil { variadicArgs[i] = a.(string) } } run(args[0].(biz.SettingKey), variadicArgs...) }) return _c } func (_c *SettingRepo_Get_Call) Return(_a0 string, _a1 error) *SettingRepo_Get_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *SettingRepo_Get_Call) RunAndReturn(run func(biz.SettingKey, ...string) (string, error)) *SettingRepo_Get_Call { _c.Call.Return(run) return _c } // GetBool provides a mock function with given fields: key, defaultValue func (_m *SettingRepo) GetBool(key biz.SettingKey, defaultValue ...bool) (bool, error) { _va := make([]interface{}, len(defaultValue)) for _i := range defaultValue { _va[_i] = defaultValue[_i] } var _ca []interface{} _ca = append(_ca, key) _ca = append(_ca, _va...) ret := _m.Called(_ca...) if len(ret) == 0 { panic("no return value specified for GetBool") } var r0 bool var r1 error if rf, ok := ret.Get(0).(func(biz.SettingKey, ...bool) (bool, error)); ok { return rf(key, defaultValue...) } if rf, ok := ret.Get(0).(func(biz.SettingKey, ...bool) bool); ok { r0 = rf(key, defaultValue...) } else { r0 = ret.Get(0).(bool) } if rf, ok := ret.Get(1).(func(biz.SettingKey, ...bool) error); ok { r1 = rf(key, defaultValue...) } else { r1 = ret.Error(1) } return r0, r1 } // SettingRepo_GetBool_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBool' type SettingRepo_GetBool_Call struct { *mock.Call } // GetBool is a helper method to define mock.On call // - key biz.SettingKey // - defaultValue ...bool func (_e *SettingRepo_Expecter) GetBool(key interface{}, defaultValue ...interface{}) *SettingRepo_GetBool_Call { return &SettingRepo_GetBool_Call{Call: _e.mock.On("GetBool", append([]interface{}{key}, defaultValue...)...)} } func (_c *SettingRepo_GetBool_Call) Run(run func(key biz.SettingKey, defaultValue ...bool)) *SettingRepo_GetBool_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]bool, len(args)-1) for i, a := range args[1:] { if a != nil { variadicArgs[i] = a.(bool) } } run(args[0].(biz.SettingKey), variadicArgs...) }) return _c } func (_c *SettingRepo_GetBool_Call) Return(_a0 bool, _a1 error) *SettingRepo_GetBool_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *SettingRepo_GetBool_Call) RunAndReturn(run func(biz.SettingKey, ...bool) (bool, error)) *SettingRepo_GetBool_Call { _c.Call.Return(run) return _c } // GetPanelSetting provides a mock function with given fields: ctx func (_m *SettingRepo) GetPanelSetting(ctx context.Context) (*request.PanelSetting, error) { ret := _m.Called(ctx) if len(ret) == 0 { panic("no return value specified for GetPanelSetting") } var r0 *request.PanelSetting var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*request.PanelSetting, error)); ok { return rf(ctx) } if rf, ok := ret.Get(0).(func(context.Context) *request.PanelSetting); ok { r0 = rf(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*request.PanelSetting) } } if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // SettingRepo_GetPanelSetting_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPanelSetting' type SettingRepo_GetPanelSetting_Call struct { *mock.Call } // GetPanelSetting is a helper method to define mock.On call // - ctx context.Context func (_e *SettingRepo_Expecter) GetPanelSetting(ctx interface{}) *SettingRepo_GetPanelSetting_Call { return &SettingRepo_GetPanelSetting_Call{Call: _e.mock.On("GetPanelSetting", ctx)} } func (_c *SettingRepo_GetPanelSetting_Call) Run(run func(ctx context.Context)) *SettingRepo_GetPanelSetting_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context)) }) return _c } func (_c *SettingRepo_GetPanelSetting_Call) Return(_a0 *request.PanelSetting, _a1 error) *SettingRepo_GetPanelSetting_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *SettingRepo_GetPanelSetting_Call) RunAndReturn(run func(context.Context) (*request.PanelSetting, error)) *SettingRepo_GetPanelSetting_Call { _c.Call.Return(run) return _c } // Set provides a mock function with given fields: key, value func (_m *SettingRepo) Set(key biz.SettingKey, value string) error { ret := _m.Called(key, value) if len(ret) == 0 { panic("no return value specified for Set") } var r0 error if rf, ok := ret.Get(0).(func(biz.SettingKey, string) error); ok { r0 = rf(key, value) } else { r0 = ret.Error(0) } return r0 } // SettingRepo_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set' type SettingRepo_Set_Call struct { *mock.Call } // Set is a helper method to define mock.On call // - key biz.SettingKey // - value string func (_e *SettingRepo_Expecter) Set(key interface{}, value interface{}) *SettingRepo_Set_Call { return &SettingRepo_Set_Call{Call: _e.mock.On("Set", key, value)} } func (_c *SettingRepo_Set_Call) Run(run func(key biz.SettingKey, value string)) *SettingRepo_Set_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(biz.SettingKey), args[1].(string)) }) return _c } func (_c *SettingRepo_Set_Call) Return(_a0 error) *SettingRepo_Set_Call { _c.Call.Return(_a0) return _c } func (_c *SettingRepo_Set_Call) RunAndReturn(run func(biz.SettingKey, string) error) *SettingRepo_Set_Call { _c.Call.Return(run) return _c } // UpdatePanelSetting provides a mock function with given fields: ctx, setting func (_m *SettingRepo) UpdatePanelSetting(ctx context.Context, setting *request.PanelSetting) (bool, error) { ret := _m.Called(ctx, setting) if len(ret) == 0 { panic("no return value specified for UpdatePanelSetting") } var r0 bool var r1 error if rf, ok := ret.Get(0).(func(context.Context, *request.PanelSetting) (bool, error)); ok { return rf(ctx, setting) } if rf, ok := ret.Get(0).(func(context.Context, *request.PanelSetting) bool); ok { r0 = rf(ctx, setting) } else { r0 = ret.Get(0).(bool) } if rf, ok := ret.Get(1).(func(context.Context, *request.PanelSetting) error); ok { r1 = rf(ctx, setting) } else { r1 = ret.Error(1) } return r0, r1 } // SettingRepo_UpdatePanelSetting_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePanelSetting' type SettingRepo_UpdatePanelSetting_Call struct { *mock.Call } // UpdatePanelSetting is a helper method to define mock.On call // - ctx context.Context // - setting *request.PanelSetting func (_e *SettingRepo_Expecter) UpdatePanelSetting(ctx interface{}, setting interface{}) *SettingRepo_UpdatePanelSetting_Call { return &SettingRepo_UpdatePanelSetting_Call{Call: _e.mock.On("UpdatePanelSetting", ctx, setting)} } func (_c *SettingRepo_UpdatePanelSetting_Call) Run(run func(ctx context.Context, setting *request.PanelSetting)) *SettingRepo_UpdatePanelSetting_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*request.PanelSetting)) }) return _c } func (_c *SettingRepo_UpdatePanelSetting_Call) Return(_a0 bool, _a1 error) *SettingRepo_UpdatePanelSetting_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *SettingRepo_UpdatePanelSetting_Call) RunAndReturn(run func(context.Context, *request.PanelSetting) (bool, error)) *SettingRepo_UpdatePanelSetting_Call { _c.Call.Return(run) return _c } // NewSettingRepo creates a new instance of SettingRepo. 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 NewSettingRepo(t interface { mock.TestingT Cleanup(func()) }) *SettingRepo { mock := &SettingRepo{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }