Documentation ¶
Index ¶
- Constants
- func InputTypeError(prompterApp WalletPrompterInterface) error
- func NewEnvPrompter(app *walletapp.WalletApp) *envPrompter
- func WakeUpPrompt(prompterApp WalletPrompterInterface, req PromptRequest, acc *account.Account) (interface{}, error)
- type BackupMethod
- type PromptLocker
- type PromptRequest
- type WalletPrompter
- type WalletPrompterInterface
Constants ¶
View Source
const (
AlreadyListeningErr = "prompter is already listening"
)
View Source
const (
TIMEOUT = 1 * time.Minute
)
Variables ¶
This section is empty.
Functions ¶
func InputTypeError ¶
func InputTypeError(prompterApp WalletPrompterInterface) error
func NewEnvPrompter ¶
func WakeUpPrompt ¶
func WakeUpPrompt( prompterApp WalletPrompterInterface, req PromptRequest, acc *account.Account, ) (interface{}, error)
Types ¶
type BackupMethod ¶
type BackupMethod string
const ( YamlFileBackup BackupMethod = "yaml" PrivateKeyBackup BackupMethod = "privateKey" )
type PromptLocker ¶
type PromptLocker struct { PromptApp *walletapp.WalletApp // contains filtered or unexported fields }
func (*PromptLocker) App ¶
func (w *PromptLocker) App() *walletapp.WalletApp
func (*PromptLocker) IsListening ¶
func (w *PromptLocker) IsListening() bool
func (*PromptLocker) Lock ¶
func (w *PromptLocker) Lock()
func (*PromptLocker) Unlock ¶
func (w *PromptLocker) Unlock()
type PromptRequest ¶
type PromptRequest struct { Action walletapp.PromptRequestAction Msg string Data interface{} CodeMessage string CorrelationID string }
type WalletPrompter ¶
type WalletPrompter struct {
PromptLocker
}
WalletPrompter is a struct that wraps a Wails GUI application and implements the WalletPrompterInterface interface.
func NewWalletPrompter ¶
func NewWalletPrompter(app *walletapp.WalletApp) *WalletPrompter
func (*WalletPrompter) EmitEvent ¶
func (w *WalletPrompter) EmitEvent(eventId string, data walletapp.EventData)
func (*WalletPrompter) PromptRequest ¶
func (w *WalletPrompter) PromptRequest(req PromptRequest)
func (*WalletPrompter) SelectBackupFilepath ¶
func (w *WalletPrompter) SelectBackupFilepath(nickname string) (string, error)
type WalletPrompterInterface ¶
type WalletPrompterInterface interface { PromptRequest(req PromptRequest) EmitEvent(eventId string, data walletapp.EventData) App() *walletapp.WalletApp IsListening() bool Unlock() Lock() SelectBackupFilepath(nickname string) (string, error) }
WalletPrompterInterface is used to mock the WalletPrompter struct in tests.
Click to show internal directories.
Click to hide internal directories.