Documentation ¶
Index ¶
- Constants
- Variables
- func AreYouSure() bool
- func ArgMustBeSpecifiedError(name string) error
- func DoYouApproveTx() bool
- func FlagMustBeSpecifiedError(name string) error
- func FlagRequireLessThanFlagError(less, greater string) error
- func FlagsMutuallyExclusiveError(n1, n2 string) error
- func GetConfirmedPassphrase(passphraseFile string) (string, error)
- func GetPassphrase(passphraseFile string) (string, error)
- func InvalidFlagFormatError(name string) error
- func MustBase64EncodedError(name string) error
- func OneOfFlagsMustBeSpecifiedError(n1, n2 string) error
- func OneOfParentsFlagMustBeSpecifiedError(name string, parents ...string) error
- func ReadConfirmedPassphraseInput() (string, error)
- func ReadPassphraseFile(passphraseFilePath string) (string, error)
- func ReadPassphraseInput() (string, error)
- func ReadPassphraseInputWithOpts(withConfirmation bool) (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 ¶ added in v0.14.0
func AreYouSure() bool
func ArgMustBeSpecifiedError ¶
func DoYouApproveTx ¶ added in v0.14.0
func DoYouApproveTx() bool
func FlagRequireLessThanFlagError ¶ added in v0.11.0
func GetConfirmedPassphrase ¶ added in v0.11.0
func GetPassphrase ¶
func InvalidFlagFormatError ¶
func MustBase64EncodedError ¶
func OneOfParentsFlagMustBeSpecifiedError ¶ added in v0.11.0
func ReadPassphraseFile ¶
func ReadPassphraseInput ¶
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.