cli

package
v0.0.0-...-0adad2b Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Edit

func Edit(targetPath string) error

func IsInteractive

func IsInteractive() bool

func RequestBump

func RequestBump(message string, currentVersion semver.Version) (semver.Bump, *semver.Version)

func RequestChoice

func RequestChoice(message string, options ...string) string

func RequestChoiceIfEmpty

func RequestChoiceIfEmpty(defaultValue string, message string, options ...string) string

RequestChoiceIfEmpty returns defaultValue if it is not empty, otherwise requests a choice from the user.

func RequestConfirmFromUser

func RequestConfirmFromUser(label string, args ...interface{}) bool

func RequestMultiChoice

func RequestMultiChoice(message string, options []string) []string

func RequestMultiChoiceIfEmpty

func RequestMultiChoiceIfEmpty(defaultValue []string, message string, options []string) []string

func RequestSecretFromUser

func RequestSecretFromUser(text string, args ...interface{}) string

func RequestStringFromUser

func RequestStringFromUser(text string, args ...interface{}) string

Types

type EnvironmentVariableGetter

type EnvironmentVariableGetter interface {
	GetEnvironmentVariables() map[string]string
}

EnvironmentVariableGetter can return a map of environment variables.

type Parameters

type Parameters struct {
	Verbose        bool              `yaml:"verbose"`
	DryRun         bool              `yaml:"dryRun"`
	Force          bool              `yaml:"force"`
	NoReport       bool              `yaml:"noReport"`
	ForceTests     bool              `yaml:"forceTests"`
	ValueOverrides map[string]string `yaml:"valueOverrides"`
	FileOverrides  []string          `yaml:"fileOverrides"`
	// Indicates no environment needs to be loaded in this run.
	NoEnvironment bool `yaml:"noEnvironment"`
	// Indicates no cluster is needed in this run.
	NoCluster        bool     `yaml:"noCluster"`
	ConfirmedEnv     string   `yaml:"confirmedEnv"`
	ProviderPriority []string `yaml:"providerPriority"`
	Sudo             bool     `yaml:"sudo"`
	// Additional parameters not strictly defined.
	Misc map[string]string `yaml:"misc"`
}

type ParametersGetter

type ParametersGetter interface {
	GetParameters() Parameters
}

type Pwder

type Pwder interface {
	Pwd() string
}

Pwder can return the working directory.

type WithPwder

type WithPwder interface {
	Pwder
	WithPwd(pwd string) WithPwder
}

Jump to

Keyboard shortcuts

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