inputs

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2019 License: Apache-2.0 Imports: 3 Imported by: 4

Documentation

Overview

Package inputs handles the user interactions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFlagBoolVal

func GetFlagBoolVal(cmd *cobra.Command, flag string) (bool, error)

GetFlagBoolVal method returns the Boolean flag value

func GetFlagStringArrayVal

func GetFlagStringArrayVal(cmd *cobra.Command, flag string) ([]string, error)

GetFlagStringArrayVal method returns the String array flag value

func GetFlagStringVal

func GetFlagStringVal(cmd *cobra.Command, flag string) (string, error)

GetFlagStringVal method returns the String flag value

func HasProvidedValidID

func HasProvidedValidID() func(cmd *cobra.Command, args []string) error

HasProvidedValidID returns a function which validates the ID input

func IsArgValid

func IsArgValid(arg string) bool

IsArgValid method check whether the CMD arg are valid or not

func IsPasswordValid

func IsPasswordValid(passphrase string) bool

IsPasswordValid method check whether the Password is valid or not

func IsValidSingleArg

func IsValidSingleArg(args []string) bool

IsValidSingleArg method check whether the CMD args are valid or not

func PromptForPassword

func PromptForPassword(label string, validate promptui.ValidateFunc) (string, error)

PromptForPassword function prompt for password and returns the input

func PromptForSelect

func PromptForSelect(l string, items []string) (string, error)

PromptForSelect start selection and return the selected value

func PromptForString

func PromptForString(label string, validate promptui.ValidateFunc) (string, error)

PromptForString function prompt for string and returns the input

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL