Documentation ¶
Index ¶
- func DefaultHome() string
- func DefaultKeystore() string
- func DefaultPassword() string
- func ParseBigInt(str string) (*big.Int, error)
- func ParseUint64(str string) (uint64, error)
- func ReadPassphraseFromFile(passwordFile string) (string, error)
- func ReadPassphraseFromPrompter() (string, error)
- func ReadPassphraseFromPrompter2(prompt string) (string, error)
- type ChainExecutor
- type ContractExecutorWithKeystore
- type ContractExecutorWithPrivateKey
- type Executor
- type ExecutorHandler
- type TerminalPrompter
- func (p *TerminalPrompter) AppendHistory(command string)
- func (p *TerminalPrompter) Prompt(prompt string) (string, error)
- func (p *TerminalPrompter) PromptConfirm(prompt string) (bool, error)
- func (p *TerminalPrompter) PromptPassphrase(prompt string) (passwd string, err error)
- func (p *TerminalPrompter) SetHistory(history []string)
- func (p *TerminalPrompter) SetWordCompleter(completer liner.WordCompleter)
- type UserPrompter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultHome ¶
func DefaultHome() string
func DefaultKeystore ¶
func DefaultKeystore() string
func DefaultPassword ¶
func DefaultPassword() string
func ParseUint64 ¶
func ReadPassphraseFromFile ¶
Types ¶
type ChainExecutor ¶
type ChainExecutor struct {
// contains filtered or unexported fields
}
func (*ChainExecutor) Execute ¶
func (e *ChainExecutor) Execute(handler ExecutorHandler) error
type ContractExecutorWithKeystore ¶
type ContractExecutorWithKeystore struct { ChainExecutor // contains filtered or unexported fields }
func (*ContractExecutorWithKeystore) Execute ¶
func (e *ContractExecutorWithKeystore) Execute(handler ExecutorHandler) error
type ContractExecutorWithPrivateKey ¶
type ContractExecutorWithPrivateKey struct { ChainExecutor // contains filtered or unexported fields }
func (*ContractExecutorWithPrivateKey) Execute ¶
func (e *ContractExecutorWithPrivateKey) Execute(handler ExecutorHandler) error
type Executor ¶
type Executor interface {
Execute(handler ExecutorHandler) error
}
func NewChainExecutor ¶
type ExecutorHandler ¶
type ExecutorHandler func(*ethclient.Client, *bind.TransactOpts) error
type TerminalPrompter ¶
type TerminalPrompter struct {
// contains filtered or unexported fields
}
TerminalPrompter terminal prompter
func NewTerminalPrompter ¶
func NewTerminalPrompter() *TerminalPrompter
NewTerminalPrompter create a terminal prompter
func (*TerminalPrompter) AppendHistory ¶
func (p *TerminalPrompter) AppendHistory(command string)
AppendHistory appends an entry to the scrollback history.
func (*TerminalPrompter) Prompt ¶
func (p *TerminalPrompter) Prompt(prompt string) (string, error)
Prompt shows the prompt and requests text input returning the input.
func (*TerminalPrompter) PromptConfirm ¶
func (p *TerminalPrompter) PromptConfirm(prompt string) (bool, error)
PromptConfirm shows the prompt to the user and requests a boolean choice to be made, returning that choice.
func (*TerminalPrompter) PromptPassphrase ¶
func (p *TerminalPrompter) PromptPassphrase(prompt string) (passwd string, err error)
PromptPassphrase shows the prompt and request passphrase text input, the passphrase not show, returns the passphrase
func (*TerminalPrompter) SetHistory ¶
func (p *TerminalPrompter) SetHistory(history []string)
SetHistory sets the history that the prompter will allow the user to scroll back to.
func (*TerminalPrompter) SetWordCompleter ¶
func (p *TerminalPrompter) SetWordCompleter(completer liner.WordCompleter)
SetWordCompleter sets the completion function that the prompter will call to fetch completion candidates when the user presses tab.
type UserPrompter ¶
type UserPrompter interface { Prompt(prompt string) (string, error) PromptPassphrase(prompt string) (passwd string, err error) PromptConfirm(prompt string) (bool, error) SetHistory(history []string) AppendHistory(command string) SetWordCompleter(completer liner.WordCompleter) }
UserPrompter handle console user input interactive