Documentation ¶
Index ¶
- func AddKubectlFlagsToCmd(cmd *cobra.Command) clientcmd.ClientConfig
- func AddKubectlFlagsToSet(flags *pflag.FlagSet) clientcmd.ClientConfig
- func AskToProceed(message string) bool
- func AskToProceedS(message string) string
- func InteractiveEdit(filePattern string, data []byte, save func(input []byte) error)
- func NewVersionCmd(cliName string) *cobra.Command
- func PrintDiff(name string, live *unstructured.Unstructured, ...) error
- func PromptCredentials(username, password string) (string, string)
- func PromptMessage(message, value string) string
- func PromptPassword(password string) string
- func PromptUsername(username string) string
- func ReadAndConfirmPassword(username string) (string, error)
- func SetGLogLevel(glogLevel int)
- func SetLogFormat(logFormat string)
- func SetLogLevel(logLevel string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddKubectlFlagsToCmd ¶
func AddKubectlFlagsToCmd(cmd *cobra.Command) clientcmd.ClientConfig
AddKubectlFlagsToCmd adds kubectl like flags to a persistent flags of a command and returns the ClientConfig interface for retrieving the values.
func AddKubectlFlagsToSet ¶ added in v2.2.0
func AddKubectlFlagsToSet(flags *pflag.FlagSet) clientcmd.ClientConfig
AddKubectlFlagsToSet adds kubectl like flags to a provided flag set and returns the ClientConfig interface for retrieving the values.
func AskToProceed ¶
AskToProceed prompts the user with a message (typically a yes or no question) and returns whether they responded in the affirmative or negative.
func AskToProceedS ¶ added in v2.5.0
AskToProceedS prompts the user with a message (typically a yes, no or all question) and returns string "a", "y" or "n".
func InteractiveEdit ¶
InteractiveEdit launches an interactive editor
func NewVersionCmd ¶
NewVersionCmd returns a new `version` command to be used as a sub-command to root
func PrintDiff ¶
func PrintDiff(name string, live *unstructured.Unstructured, target *unstructured.Unstructured) error
PrintDiff prints a diff between two unstructured objects to stdout using an external diff utility Honors the diff utility set in the KUBECTL_EXTERNAL_DIFF environment variable
func PromptCredentials ¶
PromptCredentials is a helper to prompt the user for a username and password (unless already supplied)
func PromptMessage ¶
PromptMessage prompts the user for a value (unless already supplied)
func PromptPassword ¶
PromptPassword prompts the user for a password, without local echo. (unless already supplied)
func PromptUsername ¶
PromptUsername prompts the user for a username value
func ReadAndConfirmPassword ¶
ReadAndConfirmPassword is a helper to read and confirm a password from stdin
func SetGLogLevel ¶
func SetGLogLevel(glogLevel int)
SetGLogLevel set the glog level for the k8s go-client
Types ¶
This section is empty.