Documentation ¶
Index ¶
- Constants
- Variables
- func AreYouSure() bool
- func ArgMustBeSpecifiedError(name string) error
- func DoYouApproveTx() bool
- func GetConfirmedPassphrase(passphraseFile string) (string, error)
- func GetConfirmedPassphraseWithContext(passphraseContext, passphraseFile string) (string, error)
- func GetPassphrase(passphraseFile string) (string, error)
- func InvalidFlagFormatError(name string) error
- func MustBase64EncodedError(name string) error
- func MustBeSpecifiedError(name string) error
- func MutuallyExclusiveError(n1, n2 string) error
- func OneOfFlagsMustBeSpecifiedError(n1, n2 string) error
- func OneOfParentsFlagMustBeSpecifiedError(name string, parents ...string) error
- func ReadConfirmedPassphraseInput(passphraseContext string) (string, error)
- func ReadPassphraseFile(passphraseFilePath string) (string, error)
- func ReadPassphraseInput() (string, error)
- func ReadPassphraseInputWithOpts(passphraseContext string, withConfirmation bool) (string, error)
- func RequireLessThanFlagError(less, greater string) error
- func TooManyArgsError(names ...string) error
- func UnsupportedFlagValueError(name string, unsupported interface{}, supported []interface{}) error
- func ValidateOutput(output string) error
- func YesOrNo(question string) bool
- type FlagError
- type PassphraseGetterWithOps
Constants ¶
View Source
const ( InteractiveOutput = "interactive" JSONOutput = "json" )
Variables ¶
View Source
var ( ErrUnsupportedOutput = errors.New("unsupported output") AvailableOutputs = []string{ InteractiveOutput, JSONOutput, } )
View Source
var ( ErrPassphraseRequiredWithoutTTY = errors.New("passphrase flag is required without TTY") ErrPassphraseDoNotMatch = errors.New("passphrases do not match") ErrPassphraseMustBeSpecified = errors.New("passphrase must be specified") ErrMsysPasswordInput = errors.New("password input is not supported on msys (use --passphrase-file or a standard windows terminal)") )
Functions ¶
func AreYouSure ¶
func AreYouSure() bool
func ArgMustBeSpecifiedError ¶
func DoYouApproveTx ¶
func DoYouApproveTx() bool
func GetConfirmedPassphrase ¶
func GetConfirmedPassphraseWithContext ¶ added in v0.59.0
func GetPassphrase ¶
func InvalidFlagFormatError ¶
func MustBase64EncodedError ¶
func MustBeSpecifiedError ¶ added in v0.55.0
func MutuallyExclusiveError ¶ added in v0.55.0
func ReadPassphraseFile ¶
func ReadPassphraseInput ¶
func RequireLessThanFlagError ¶ added in v0.55.0
func TooManyArgsError ¶
func ValidateOutput ¶
Types ¶
type PassphraseGetterWithOps ¶
func BuildPassphraseGetterWithOps ¶
func BuildPassphraseGetterWithOps(passphraseFile string) PassphraseGetterWithOps
BuildPassphraseGetterWithOps builds a function that returns a passphrase. If passphraseFile is set, the returned function is built to read a file. If it's not set, the returned function is built to read from user input. The one based on the user input takes an argument withConfirmation that asks for passphrase confirmation base on its value.
Click to show internal directories.
Click to hide internal directories.