Documentation ¶
Index ¶
- Constants
- Variables
- func ArgMustBeSpecifiedError(name string) error
- func FlagMustBeSpecifiedError(name string) error
- func FlagsMutuallyExclusiveError(n1, n2 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 ParentFlagMustBeSpecifiedError(name string, parent 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
- 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, } )
Functions ¶
func ArgMustBeSpecifiedError ¶
func GetPassphrase ¶
func InvalidFlagFormatError ¶
func MustBase64EncodedError ¶
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.