cli

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PrintBluef func(format string, a ...interface{})
View Source
var PrintGreenf func(format string, a ...interface{})
View Source
var PrintRedf func(format string, a ...interface{})
View Source
var PrintYellowf func(format string, a ...interface{})

Functions

func AskForConfirmation

func AskForConfirmation(s string) bool

askForConfirmation asks the user for confirmation. A user must type in "yes" or "no" and then press enter. It has fuzzy matching, so "y", "Y", "yes", "YES", and "Yes" all count as confirmations. If the input is not recognized, it will ask again. The function does not return until it gets a valid response from the user.

func DebugMsg added in v0.8.0

func DebugMsg(messages ...string)

func EditEnvFile

func EditEnvFile(content string) (string, error)

func ExecOcCmd

func ExecOcCmd(args []string, namespace string, selector string) *exec.Cmd

func ExecPlainOcCmd

func ExecPlainOcCmd(args []string) *exec.Cmd

func GetFileFlags added in v0.6.0

func GetFileFlags(filename string, verboseOrDebug bool) (map[string]string, error)

func VerboseMsg

func VerboseMsg(messages ...string)

Types

type CompareOptions added in v0.6.0

type CompareOptions struct {
	*GlobalOptions
	Labels                  string
	Params                  []string
	ParamFiles              []string
	Diff                    string
	IgnorePaths             []string
	IgnoreUnknownParameters bool
	UpsertOnly              bool
	Force                   bool
	Resource                string
}

func (*CompareOptions) Process added in v0.6.0

func (o *CompareOptions) Process() error

func (*CompareOptions) UpdateWithFile added in v0.6.0

func (o *CompareOptions) UpdateWithFile(fileFlags map[string]string)

func (*CompareOptions) UpdateWithFlags added in v0.6.0

func (o *CompareOptions) UpdateWithFlags(labelsFlag string, paramFlag []string, paramFileFlag []string, diffFlag string, ignorePathFlag []string, ignoreUnknownParametersFlag bool, upsertOnlyFlag bool, forceFlag bool, resourceArg string)

type ExportOptions added in v0.6.0

type ExportOptions struct {
	*GlobalOptions
	Resource string
}

func (*ExportOptions) Process added in v0.9.0

func (o *ExportOptions) Process() error

func (*ExportOptions) UpdateWithFile added in v0.6.0

func (o *ExportOptions) UpdateWithFile(fileFlags map[string]string)

func (*ExportOptions) UpdateWithFlags added in v0.6.0

func (o *ExportOptions) UpdateWithFlags(resourceArg string)

type GlobalOptions added in v0.6.0

type GlobalOptions struct {
	Verbose        bool
	Debug          bool
	NonInteractive bool
	File           string
	Namespace      string
	Selector       string
	TemplateDirs   []string
	ParamDirs      []string
	PublicKeyDir   string
	PrivateKey     string
	Passphrase     string
	IsLoggedIn     bool
}

func (*GlobalOptions) CheckLoggedIn added in v0.9.0

func (o *GlobalOptions) CheckLoggedIn() bool

func (*GlobalOptions) Process added in v0.6.0

func (o *GlobalOptions) Process() error

func (*GlobalOptions) UpdateWithFile added in v0.6.0

func (o *GlobalOptions) UpdateWithFile(fileFlags map[string]string)

func (*GlobalOptions) UpdateWithFlags added in v0.6.0

func (o *GlobalOptions) UpdateWithFlags(verboseFlag bool, debugFlag bool, nonInteractiveFlag bool, namespaceFlag string, selectorFlag string, templateDirFlag []string, paramDirFlag []string, publicKeyDirFlag string, privateKeyFlag string, passphraseFlag string)

Jump to

Keyboard shortcuts

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