alby-hub/tests/mocks/Config.go
Roland 3b3c37dd0c
fix: remove legacy acceptance of empty unlock password check (#2534)
* fix: remove legacy acceptance of empty unlock password check

CheckUnlockPassword previously treated a missing or empty
UnlockPasswordCheck value as a match — a legacy compatibility path from
before the canary was always written. It now requires the stored value
to be present and to equal the expected string.

StartApp checks for the canary up front and, if it is missing, stops
with a message asking the user to restore from a backup rather than
continuing. A new IsUnlockPasswordCheckSet helper reports whether the
value is present.

keys.Init now returns the error from reading NostrSecretKey instead of
ignoring it, so a read failure aborts instead of generating and saving a
new key.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: add operation context to unlock password check errors

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-12 14:48:06 +07:00

1019 lines
28 KiB
Go

// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify
package mocks
import (
"github.com/getAlby/hub/config"
mock "github.com/stretchr/testify/mock"
)
// NewMockConfig creates a new instance of MockConfig. 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 NewMockConfig(t interface {
mock.TestingT
Cleanup(func())
}) *MockConfig {
mock := &MockConfig{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}
// MockConfig is an autogenerated mock type for the Config type
type MockConfig struct {
mock.Mock
}
type MockConfig_Expecter struct {
mock *mock.Mock
}
func (_m *MockConfig) EXPECT() *MockConfig_Expecter {
return &MockConfig_Expecter{mock: &_m.Mock}
}
// ChangeUnlockPassword provides a mock function for the type MockConfig
func (_mock *MockConfig) ChangeUnlockPassword(currentUnlockPassword string, newUnlockPassword string) error {
ret := _mock.Called(currentUnlockPassword, newUnlockPassword)
if len(ret) == 0 {
panic("no return value specified for ChangeUnlockPassword")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(string, string) error); ok {
r0 = returnFunc(currentUnlockPassword, newUnlockPassword)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockConfig_ChangeUnlockPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChangeUnlockPassword'
type MockConfig_ChangeUnlockPassword_Call struct {
*mock.Call
}
// ChangeUnlockPassword is a helper method to define mock.On call
// - currentUnlockPassword string
// - newUnlockPassword string
func (_e *MockConfig_Expecter) ChangeUnlockPassword(currentUnlockPassword interface{}, newUnlockPassword interface{}) *MockConfig_ChangeUnlockPassword_Call {
return &MockConfig_ChangeUnlockPassword_Call{Call: _e.mock.On("ChangeUnlockPassword", currentUnlockPassword, newUnlockPassword)}
}
func (_c *MockConfig_ChangeUnlockPassword_Call) Run(run func(currentUnlockPassword string, newUnlockPassword string)) *MockConfig_ChangeUnlockPassword_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
var arg1 string
if args[1] != nil {
arg1 = args[1].(string)
}
run(
arg0,
arg1,
)
})
return _c
}
func (_c *MockConfig_ChangeUnlockPassword_Call) Return(err error) *MockConfig_ChangeUnlockPassword_Call {
_c.Call.Return(err)
return _c
}
func (_c *MockConfig_ChangeUnlockPassword_Call) RunAndReturn(run func(currentUnlockPassword string, newUnlockPassword string) error) *MockConfig_ChangeUnlockPassword_Call {
_c.Call.Return(run)
return _c
}
// CheckUnlockPassword provides a mock function for the type MockConfig
func (_mock *MockConfig) CheckUnlockPassword(password string) bool {
ret := _mock.Called(password)
if len(ret) == 0 {
panic("no return value specified for CheckUnlockPassword")
}
var r0 bool
if returnFunc, ok := ret.Get(0).(func(string) bool); ok {
r0 = returnFunc(password)
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// MockConfig_CheckUnlockPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckUnlockPassword'
type MockConfig_CheckUnlockPassword_Call struct {
*mock.Call
}
// CheckUnlockPassword is a helper method to define mock.On call
// - password string
func (_e *MockConfig_Expecter) CheckUnlockPassword(password interface{}) *MockConfig_CheckUnlockPassword_Call {
return &MockConfig_CheckUnlockPassword_Call{Call: _e.mock.On("CheckUnlockPassword", password)}
}
func (_c *MockConfig_CheckUnlockPassword_Call) Run(run func(password string)) *MockConfig_CheckUnlockPassword_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
run(
arg0,
)
})
return _c
}
func (_c *MockConfig_CheckUnlockPassword_Call) Return(b bool) *MockConfig_CheckUnlockPassword_Call {
_c.Call.Return(b)
return _c
}
func (_c *MockConfig_CheckUnlockPassword_Call) RunAndReturn(run func(password string) bool) *MockConfig_CheckUnlockPassword_Call {
_c.Call.Return(run)
return _c
}
// Get provides a mock function for the type MockConfig
func (_mock *MockConfig) Get(key string, encryptionKey string) (string, error) {
ret := _mock.Called(key, encryptionKey)
if len(ret) == 0 {
panic("no return value specified for Get")
}
var r0 string
var r1 error
if returnFunc, ok := ret.Get(0).(func(string, string) (string, error)); ok {
return returnFunc(key, encryptionKey)
}
if returnFunc, ok := ret.Get(0).(func(string, string) string); ok {
r0 = returnFunc(key, encryptionKey)
} else {
r0 = ret.Get(0).(string)
}
if returnFunc, ok := ret.Get(1).(func(string, string) error); ok {
r1 = returnFunc(key, encryptionKey)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockConfig_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
type MockConfig_Get_Call struct {
*mock.Call
}
// Get is a helper method to define mock.On call
// - key string
// - encryptionKey string
func (_e *MockConfig_Expecter) Get(key interface{}, encryptionKey interface{}) *MockConfig_Get_Call {
return &MockConfig_Get_Call{Call: _e.mock.On("Get", key, encryptionKey)}
}
func (_c *MockConfig_Get_Call) Run(run func(key string, encryptionKey string)) *MockConfig_Get_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
var arg1 string
if args[1] != nil {
arg1 = args[1].(string)
}
run(
arg0,
arg1,
)
})
return _c
}
func (_c *MockConfig_Get_Call) Return(s string, err error) *MockConfig_Get_Call {
_c.Call.Return(s, err)
return _c
}
func (_c *MockConfig_Get_Call) RunAndReturn(run func(key string, encryptionKey string) (string, error)) *MockConfig_Get_Call {
_c.Call.Return(run)
return _c
}
// GetBitcoinDisplayFormat provides a mock function for the type MockConfig
func (_mock *MockConfig) GetBitcoinDisplayFormat() string {
ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for GetBitcoinDisplayFormat")
}
var r0 string
if returnFunc, ok := ret.Get(0).(func() string); ok {
r0 = returnFunc()
} else {
r0 = ret.Get(0).(string)
}
return r0
}
// MockConfig_GetBitcoinDisplayFormat_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBitcoinDisplayFormat'
type MockConfig_GetBitcoinDisplayFormat_Call struct {
*mock.Call
}
// GetBitcoinDisplayFormat is a helper method to define mock.On call
func (_e *MockConfig_Expecter) GetBitcoinDisplayFormat() *MockConfig_GetBitcoinDisplayFormat_Call {
return &MockConfig_GetBitcoinDisplayFormat_Call{Call: _e.mock.On("GetBitcoinDisplayFormat")}
}
func (_c *MockConfig_GetBitcoinDisplayFormat_Call) Run(run func()) *MockConfig_GetBitcoinDisplayFormat_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockConfig_GetBitcoinDisplayFormat_Call) Return(s string) *MockConfig_GetBitcoinDisplayFormat_Call {
_c.Call.Return(s)
return _c
}
func (_c *MockConfig_GetBitcoinDisplayFormat_Call) RunAndReturn(run func() string) *MockConfig_GetBitcoinDisplayFormat_Call {
_c.Call.Return(run)
return _c
}
// GetCurrency provides a mock function for the type MockConfig
func (_mock *MockConfig) GetCurrency() string {
ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for GetCurrency")
}
var r0 string
if returnFunc, ok := ret.Get(0).(func() string); ok {
r0 = returnFunc()
} else {
r0 = ret.Get(0).(string)
}
return r0
}
// MockConfig_GetCurrency_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCurrency'
type MockConfig_GetCurrency_Call struct {
*mock.Call
}
// GetCurrency is a helper method to define mock.On call
func (_e *MockConfig_Expecter) GetCurrency() *MockConfig_GetCurrency_Call {
return &MockConfig_GetCurrency_Call{Call: _e.mock.On("GetCurrency")}
}
func (_c *MockConfig_GetCurrency_Call) Run(run func()) *MockConfig_GetCurrency_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockConfig_GetCurrency_Call) Return(s string) *MockConfig_GetCurrency_Call {
_c.Call.Return(s)
return _c
}
func (_c *MockConfig_GetCurrency_Call) RunAndReturn(run func() string) *MockConfig_GetCurrency_Call {
_c.Call.Return(run)
return _c
}
// GetEnv provides a mock function for the type MockConfig
func (_mock *MockConfig) GetEnv() *config.AppConfig {
ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for GetEnv")
}
var r0 *config.AppConfig
if returnFunc, ok := ret.Get(0).(func() *config.AppConfig); ok {
r0 = returnFunc()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*config.AppConfig)
}
}
return r0
}
// MockConfig_GetEnv_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEnv'
type MockConfig_GetEnv_Call struct {
*mock.Call
}
// GetEnv is a helper method to define mock.On call
func (_e *MockConfig_Expecter) GetEnv() *MockConfig_GetEnv_Call {
return &MockConfig_GetEnv_Call{Call: _e.mock.On("GetEnv")}
}
func (_c *MockConfig_GetEnv_Call) Run(run func()) *MockConfig_GetEnv_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockConfig_GetEnv_Call) Return(appConfig *config.AppConfig) *MockConfig_GetEnv_Call {
_c.Call.Return(appConfig)
return _c
}
func (_c *MockConfig_GetEnv_Call) RunAndReturn(run func() *config.AppConfig) *MockConfig_GetEnv_Call {
_c.Call.Return(run)
return _c
}
// GetJWTSecret provides a mock function for the type MockConfig
func (_mock *MockConfig) GetJWTSecret() (string, error) {
ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for GetJWTSecret")
}
var r0 string
var r1 error
if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
return returnFunc()
}
if returnFunc, ok := ret.Get(0).(func() string); ok {
r0 = returnFunc()
} else {
r0 = ret.Get(0).(string)
}
if returnFunc, ok := ret.Get(1).(func() error); ok {
r1 = returnFunc()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockConfig_GetJWTSecret_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJWTSecret'
type MockConfig_GetJWTSecret_Call struct {
*mock.Call
}
// GetJWTSecret is a helper method to define mock.On call
func (_e *MockConfig_Expecter) GetJWTSecret() *MockConfig_GetJWTSecret_Call {
return &MockConfig_GetJWTSecret_Call{Call: _e.mock.On("GetJWTSecret")}
}
func (_c *MockConfig_GetJWTSecret_Call) Run(run func()) *MockConfig_GetJWTSecret_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockConfig_GetJWTSecret_Call) Return(s string, err error) *MockConfig_GetJWTSecret_Call {
_c.Call.Return(s, err)
return _c
}
func (_c *MockConfig_GetJWTSecret_Call) RunAndReturn(run func() (string, error)) *MockConfig_GetJWTSecret_Call {
_c.Call.Return(run)
return _c
}
// GetMempoolUrl provides a mock function for the type MockConfig
func (_mock *MockConfig) GetMempoolUrl() string {
ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for GetMempoolUrl")
}
var r0 string
if returnFunc, ok := ret.Get(0).(func() string); ok {
r0 = returnFunc()
} else {
r0 = ret.Get(0).(string)
}
return r0
}
// MockConfig_GetMempoolUrl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMempoolUrl'
type MockConfig_GetMempoolUrl_Call struct {
*mock.Call
}
// GetMempoolUrl is a helper method to define mock.On call
func (_e *MockConfig_Expecter) GetMempoolUrl() *MockConfig_GetMempoolUrl_Call {
return &MockConfig_GetMempoolUrl_Call{Call: _e.mock.On("GetMempoolUrl")}
}
func (_c *MockConfig_GetMempoolUrl_Call) Run(run func()) *MockConfig_GetMempoolUrl_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockConfig_GetMempoolUrl_Call) Return(s string) *MockConfig_GetMempoolUrl_Call {
_c.Call.Return(s)
return _c
}
func (_c *MockConfig_GetMempoolUrl_Call) RunAndReturn(run func() string) *MockConfig_GetMempoolUrl_Call {
_c.Call.Return(run)
return _c
}
// GetNetwork provides a mock function for the type MockConfig
func (_mock *MockConfig) GetNetwork() string {
ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for GetNetwork")
}
var r0 string
if returnFunc, ok := ret.Get(0).(func() string); ok {
r0 = returnFunc()
} else {
r0 = ret.Get(0).(string)
}
return r0
}
// MockConfig_GetNetwork_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNetwork'
type MockConfig_GetNetwork_Call struct {
*mock.Call
}
// GetNetwork is a helper method to define mock.On call
func (_e *MockConfig_Expecter) GetNetwork() *MockConfig_GetNetwork_Call {
return &MockConfig_GetNetwork_Call{Call: _e.mock.On("GetNetwork")}
}
func (_c *MockConfig_GetNetwork_Call) Run(run func()) *MockConfig_GetNetwork_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockConfig_GetNetwork_Call) Return(s string) *MockConfig_GetNetwork_Call {
_c.Call.Return(s)
return _c
}
func (_c *MockConfig_GetNetwork_Call) RunAndReturn(run func() string) *MockConfig_GetNetwork_Call {
_c.Call.Return(run)
return _c
}
// GetRelayUrls provides a mock function for the type MockConfig
func (_mock *MockConfig) GetRelayUrls() []string {
ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for GetRelayUrls")
}
var r0 []string
if returnFunc, ok := ret.Get(0).(func() []string); ok {
r0 = returnFunc()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
return r0
}
// MockConfig_GetRelayUrls_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRelayUrls'
type MockConfig_GetRelayUrls_Call struct {
*mock.Call
}
// GetRelayUrls is a helper method to define mock.On call
func (_e *MockConfig_Expecter) GetRelayUrls() *MockConfig_GetRelayUrls_Call {
return &MockConfig_GetRelayUrls_Call{Call: _e.mock.On("GetRelayUrls")}
}
func (_c *MockConfig_GetRelayUrls_Call) Run(run func()) *MockConfig_GetRelayUrls_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockConfig_GetRelayUrls_Call) Return(strings []string) *MockConfig_GetRelayUrls_Call {
_c.Call.Return(strings)
return _c
}
func (_c *MockConfig_GetRelayUrls_Call) RunAndReturn(run func() []string) *MockConfig_GetRelayUrls_Call {
_c.Call.Return(run)
return _c
}
// IsUnlockPasswordCheckSet provides a mock function for the type MockConfig
func (_mock *MockConfig) IsUnlockPasswordCheckSet() (bool, error) {
ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for IsUnlockPasswordCheckSet")
}
var r0 bool
var r1 error
if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok {
return returnFunc()
}
if returnFunc, ok := ret.Get(0).(func() bool); ok {
r0 = returnFunc()
} else {
r0 = ret.Get(0).(bool)
}
if returnFunc, ok := ret.Get(1).(func() error); ok {
r1 = returnFunc()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockConfig_IsUnlockPasswordCheckSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsUnlockPasswordCheckSet'
type MockConfig_IsUnlockPasswordCheckSet_Call struct {
*mock.Call
}
// IsUnlockPasswordCheckSet is a helper method to define mock.On call
func (_e *MockConfig_Expecter) IsUnlockPasswordCheckSet() *MockConfig_IsUnlockPasswordCheckSet_Call {
return &MockConfig_IsUnlockPasswordCheckSet_Call{Call: _e.mock.On("IsUnlockPasswordCheckSet")}
}
func (_c *MockConfig_IsUnlockPasswordCheckSet_Call) Run(run func()) *MockConfig_IsUnlockPasswordCheckSet_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockConfig_IsUnlockPasswordCheckSet_Call) Return(b bool, err error) *MockConfig_IsUnlockPasswordCheckSet_Call {
_c.Call.Return(b, err)
return _c
}
func (_c *MockConfig_IsUnlockPasswordCheckSet_Call) RunAndReturn(run func() (bool, error)) *MockConfig_IsUnlockPasswordCheckSet_Call {
_c.Call.Return(run)
return _c
}
// LoadJWTSecret provides a mock function for the type MockConfig
func (_mock *MockConfig) LoadJWTSecret(encryptionKey string) error {
ret := _mock.Called(encryptionKey)
if len(ret) == 0 {
panic("no return value specified for LoadJWTSecret")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(string) error); ok {
r0 = returnFunc(encryptionKey)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockConfig_LoadJWTSecret_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadJWTSecret'
type MockConfig_LoadJWTSecret_Call struct {
*mock.Call
}
// LoadJWTSecret is a helper method to define mock.On call
// - encryptionKey string
func (_e *MockConfig_Expecter) LoadJWTSecret(encryptionKey interface{}) *MockConfig_LoadJWTSecret_Call {
return &MockConfig_LoadJWTSecret_Call{Call: _e.mock.On("LoadJWTSecret", encryptionKey)}
}
func (_c *MockConfig_LoadJWTSecret_Call) Run(run func(encryptionKey string)) *MockConfig_LoadJWTSecret_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
run(
arg0,
)
})
return _c
}
func (_c *MockConfig_LoadJWTSecret_Call) Return(err error) *MockConfig_LoadJWTSecret_Call {
_c.Call.Return(err)
return _c
}
func (_c *MockConfig_LoadJWTSecret_Call) RunAndReturn(run func(encryptionKey string) error) *MockConfig_LoadJWTSecret_Call {
_c.Call.Return(run)
return _c
}
// SaveUnlockPasswordCheck provides a mock function for the type MockConfig
func (_mock *MockConfig) SaveUnlockPasswordCheck(encryptionKey string) error {
ret := _mock.Called(encryptionKey)
if len(ret) == 0 {
panic("no return value specified for SaveUnlockPasswordCheck")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(string) error); ok {
r0 = returnFunc(encryptionKey)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockConfig_SaveUnlockPasswordCheck_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveUnlockPasswordCheck'
type MockConfig_SaveUnlockPasswordCheck_Call struct {
*mock.Call
}
// SaveUnlockPasswordCheck is a helper method to define mock.On call
// - encryptionKey string
func (_e *MockConfig_Expecter) SaveUnlockPasswordCheck(encryptionKey interface{}) *MockConfig_SaveUnlockPasswordCheck_Call {
return &MockConfig_SaveUnlockPasswordCheck_Call{Call: _e.mock.On("SaveUnlockPasswordCheck", encryptionKey)}
}
func (_c *MockConfig_SaveUnlockPasswordCheck_Call) Run(run func(encryptionKey string)) *MockConfig_SaveUnlockPasswordCheck_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
run(
arg0,
)
})
return _c
}
func (_c *MockConfig_SaveUnlockPasswordCheck_Call) Return(err error) *MockConfig_SaveUnlockPasswordCheck_Call {
_c.Call.Return(err)
return _c
}
func (_c *MockConfig_SaveUnlockPasswordCheck_Call) RunAndReturn(run func(encryptionKey string) error) *MockConfig_SaveUnlockPasswordCheck_Call {
_c.Call.Return(run)
return _c
}
// SetAutoUnlockPassword provides a mock function for the type MockConfig
func (_mock *MockConfig) SetAutoUnlockPassword(unlockPassword string) error {
ret := _mock.Called(unlockPassword)
if len(ret) == 0 {
panic("no return value specified for SetAutoUnlockPassword")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(string) error); ok {
r0 = returnFunc(unlockPassword)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockConfig_SetAutoUnlockPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAutoUnlockPassword'
type MockConfig_SetAutoUnlockPassword_Call struct {
*mock.Call
}
// SetAutoUnlockPassword is a helper method to define mock.On call
// - unlockPassword string
func (_e *MockConfig_Expecter) SetAutoUnlockPassword(unlockPassword interface{}) *MockConfig_SetAutoUnlockPassword_Call {
return &MockConfig_SetAutoUnlockPassword_Call{Call: _e.mock.On("SetAutoUnlockPassword", unlockPassword)}
}
func (_c *MockConfig_SetAutoUnlockPassword_Call) Run(run func(unlockPassword string)) *MockConfig_SetAutoUnlockPassword_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
run(
arg0,
)
})
return _c
}
func (_c *MockConfig_SetAutoUnlockPassword_Call) Return(err error) *MockConfig_SetAutoUnlockPassword_Call {
_c.Call.Return(err)
return _c
}
func (_c *MockConfig_SetAutoUnlockPassword_Call) RunAndReturn(run func(unlockPassword string) error) *MockConfig_SetAutoUnlockPassword_Call {
_c.Call.Return(run)
return _c
}
// SetBitcoinDisplayFormat provides a mock function for the type MockConfig
func (_mock *MockConfig) SetBitcoinDisplayFormat(value string) error {
ret := _mock.Called(value)
if len(ret) == 0 {
panic("no return value specified for SetBitcoinDisplayFormat")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(string) error); ok {
r0 = returnFunc(value)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockConfig_SetBitcoinDisplayFormat_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetBitcoinDisplayFormat'
type MockConfig_SetBitcoinDisplayFormat_Call struct {
*mock.Call
}
// SetBitcoinDisplayFormat is a helper method to define mock.On call
// - value string
func (_e *MockConfig_Expecter) SetBitcoinDisplayFormat(value interface{}) *MockConfig_SetBitcoinDisplayFormat_Call {
return &MockConfig_SetBitcoinDisplayFormat_Call{Call: _e.mock.On("SetBitcoinDisplayFormat", value)}
}
func (_c *MockConfig_SetBitcoinDisplayFormat_Call) Run(run func(value string)) *MockConfig_SetBitcoinDisplayFormat_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
run(
arg0,
)
})
return _c
}
func (_c *MockConfig_SetBitcoinDisplayFormat_Call) Return(err error) *MockConfig_SetBitcoinDisplayFormat_Call {
_c.Call.Return(err)
return _c
}
func (_c *MockConfig_SetBitcoinDisplayFormat_Call) RunAndReturn(run func(value string) error) *MockConfig_SetBitcoinDisplayFormat_Call {
_c.Call.Return(run)
return _c
}
// SetCurrency provides a mock function for the type MockConfig
func (_mock *MockConfig) SetCurrency(value string) error {
ret := _mock.Called(value)
if len(ret) == 0 {
panic("no return value specified for SetCurrency")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(string) error); ok {
r0 = returnFunc(value)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockConfig_SetCurrency_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCurrency'
type MockConfig_SetCurrency_Call struct {
*mock.Call
}
// SetCurrency is a helper method to define mock.On call
// - value string
func (_e *MockConfig_Expecter) SetCurrency(value interface{}) *MockConfig_SetCurrency_Call {
return &MockConfig_SetCurrency_Call{Call: _e.mock.On("SetCurrency", value)}
}
func (_c *MockConfig_SetCurrency_Call) Run(run func(value string)) *MockConfig_SetCurrency_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
run(
arg0,
)
})
return _c
}
func (_c *MockConfig_SetCurrency_Call) Return(err error) *MockConfig_SetCurrency_Call {
_c.Call.Return(err)
return _c
}
func (_c *MockConfig_SetCurrency_Call) RunAndReturn(run func(value string) error) *MockConfig_SetCurrency_Call {
_c.Call.Return(run)
return _c
}
// SetIgnore provides a mock function for the type MockConfig
func (_mock *MockConfig) SetIgnore(key string, value string, encryptionKey string) error {
ret := _mock.Called(key, value, encryptionKey)
if len(ret) == 0 {
panic("no return value specified for SetIgnore")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(string, string, string) error); ok {
r0 = returnFunc(key, value, encryptionKey)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockConfig_SetIgnore_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetIgnore'
type MockConfig_SetIgnore_Call struct {
*mock.Call
}
// SetIgnore is a helper method to define mock.On call
// - key string
// - value string
// - encryptionKey string
func (_e *MockConfig_Expecter) SetIgnore(key interface{}, value interface{}, encryptionKey interface{}) *MockConfig_SetIgnore_Call {
return &MockConfig_SetIgnore_Call{Call: _e.mock.On("SetIgnore", key, value, encryptionKey)}
}
func (_c *MockConfig_SetIgnore_Call) Run(run func(key string, value string, encryptionKey string)) *MockConfig_SetIgnore_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
var arg1 string
if args[1] != nil {
arg1 = args[1].(string)
}
var arg2 string
if args[2] != nil {
arg2 = args[2].(string)
}
run(
arg0,
arg1,
arg2,
)
})
return _c
}
func (_c *MockConfig_SetIgnore_Call) Return(err error) *MockConfig_SetIgnore_Call {
_c.Call.Return(err)
return _c
}
func (_c *MockConfig_SetIgnore_Call) RunAndReturn(run func(key string, value string, encryptionKey string) error) *MockConfig_SetIgnore_Call {
_c.Call.Return(run)
return _c
}
// SetUpdate provides a mock function for the type MockConfig
func (_mock *MockConfig) SetUpdate(key string, value string, encryptionKey string) error {
ret := _mock.Called(key, value, encryptionKey)
if len(ret) == 0 {
panic("no return value specified for SetUpdate")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(string, string, string) error); ok {
r0 = returnFunc(key, value, encryptionKey)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockConfig_SetUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetUpdate'
type MockConfig_SetUpdate_Call struct {
*mock.Call
}
// SetUpdate is a helper method to define mock.On call
// - key string
// - value string
// - encryptionKey string
func (_e *MockConfig_Expecter) SetUpdate(key interface{}, value interface{}, encryptionKey interface{}) *MockConfig_SetUpdate_Call {
return &MockConfig_SetUpdate_Call{Call: _e.mock.On("SetUpdate", key, value, encryptionKey)}
}
func (_c *MockConfig_SetUpdate_Call) Run(run func(key string, value string, encryptionKey string)) *MockConfig_SetUpdate_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
var arg1 string
if args[1] != nil {
arg1 = args[1].(string)
}
var arg2 string
if args[2] != nil {
arg2 = args[2].(string)
}
run(
arg0,
arg1,
arg2,
)
})
return _c
}
func (_c *MockConfig_SetUpdate_Call) Return(err error) *MockConfig_SetUpdate_Call {
_c.Call.Return(err)
return _c
}
func (_c *MockConfig_SetUpdate_Call) RunAndReturn(run func(key string, value string, encryptionKey string) error) *MockConfig_SetUpdate_Call {
_c.Call.Return(run)
return _c
}
// SetupCompleted provides a mock function for the type MockConfig
func (_mock *MockConfig) SetupCompleted() (bool, error) {
ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for SetupCompleted")
}
var r0 bool
var r1 error
if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok {
return returnFunc()
}
if returnFunc, ok := ret.Get(0).(func() bool); ok {
r0 = returnFunc()
} else {
r0 = ret.Get(0).(bool)
}
if returnFunc, ok := ret.Get(1).(func() error); ok {
r1 = returnFunc()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockConfig_SetupCompleted_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetupCompleted'
type MockConfig_SetupCompleted_Call struct {
*mock.Call
}
// SetupCompleted is a helper method to define mock.On call
func (_e *MockConfig_Expecter) SetupCompleted() *MockConfig_SetupCompleted_Call {
return &MockConfig_SetupCompleted_Call{Call: _e.mock.On("SetupCompleted")}
}
func (_c *MockConfig_SetupCompleted_Call) Run(run func()) *MockConfig_SetupCompleted_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockConfig_SetupCompleted_Call) Return(b bool, err error) *MockConfig_SetupCompleted_Call {
_c.Call.Return(b, err)
return _c
}
func (_c *MockConfig_SetupCompleted_Call) RunAndReturn(run func() (bool, error)) *MockConfig_SetupCompleted_Call {
_c.Call.Return(run)
return _c
}