Documentation
¶
Index ¶
- type Prompt
- func (p Prompt) AskOther() (resp string, err error)
- func (p Prompt) AskPassword() (password string, err error)
- func (p Prompt) IsOTP() bool
- func (p Prompt) IsPassphraseForKey() bool
- func (p Prompt) IsPassword() bool
- func (p Prompt) RequestedOtp() string
- func (p Prompt) RequestedPassphraseForKey() string
- func (p Prompt) RequestedPassword() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Prompt ¶
type Prompt string
Prompt represents the literal SSH secret prompt a user normally sees.
func (Prompt) AskOther ¶
AskOther asks the user to input a response and returns it as a string. If an error occurs, the function will return an empty string and an error message.
func (Prompt) AskPassword ¶
AskPassword asks the user to input a password and returns it as a string. If an error occurs, the function will return an empty string and an error message.
func (Prompt) IsPassphraseForKey ¶
IsPassphraseForKey returns true if the prompt is requesting a passphrase for a ssh key.
func (Prompt) IsPassword ¶
IsPassword returns true if the prompt is requesting a password.
func (Prompt) RequestedOtp ¶
RequestedOtp extracts the OTP key from the prompt's text.
func (Prompt) RequestedPassphraseForKey ¶
RequestedPassphraseForKey extracts the file path to the ssh key.
func (Prompt) RequestedPassword ¶
RequestedPassword extracts the name of requested password.