Documentation ¶
Index ¶
- Constants
- Variables
- func AreYouSure() bool
- func ArgMustBeSpecifiedError(name string) error
- func DoYouApproveTx() bool
- func GetConfirmedPassphrase(passphraseFile string) (string, error)
- func GetConfirmedPassphraseWithContext(passphraseOptions PassphraseOptions, passphraseFile string) (string, error)
- func GetPassphrase(passphraseFile string) (string, error)
- func GetPassphraseWithOptions(options PassphraseOptions, 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 PassphraseOptions) (string, error)
- func ReadPassphraseFile(passphraseFilePath string) (string, error)
- func ReadPassphraseInput(options PassphraseOptions) (string, error)
- func ReadPassphraseInputWithOpts(passphraseOptions PassphraseOptions, 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
- type PassphraseOptions
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 GetConfirmedPassphraseWithContext(passphraseOptions PassphraseOptions, passphraseFile string) (string, error)
func GetPassphrase ¶
func GetPassphraseWithOptions ¶ added in v0.63.0
func GetPassphraseWithOptions(options PassphraseOptions, passphraseFile string) (string, error)
func InvalidFlagFormatError ¶
func MustBase64EncodedError ¶
func MustBeSpecifiedError ¶ added in v0.55.0
func MutuallyExclusiveError ¶ added in v0.55.0
func ReadConfirmedPassphraseInput ¶
func ReadConfirmedPassphraseInput(passphraseContext PassphraseOptions) (string, error)
func ReadPassphraseFile ¶
func ReadPassphraseInput ¶
func ReadPassphraseInput(options PassphraseOptions) (string, error)
func ReadPassphraseInputWithOpts ¶
func ReadPassphraseInputWithOpts(passphraseOptions PassphraseOptions, withConfirmation bool) (string, error)
func RequireLessThanFlagError ¶ added in v0.55.0
func TooManyArgsError ¶
func ValidateOutput ¶
Types ¶
type PassphraseGetterWithOps ¶
type PassphraseGetterWithOps func(PassphraseOptions, bool) (string, error)
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.
type PassphraseOptions ¶ added in v0.63.0
Click to show internal directories.
Click to hide internal directories.