Documentation ¶
Index ¶
- Constants
- Variables
- func Ask(qs []*survey.Question, response interface{}, opts ...survey.AskOpt)
- func AskOne(p survey.Prompt, response interface{}, opts ...survey.AskOpt)
- func ConfirmPrompt(label string) bool
- func GetOrAskForAStringValue(c *cli.Context, field string, label string, prev ...string) string
- func GetOrAskForBool(c *cli.Context, field string, label string, prev ...bool) bool
- func GetOrAskForBoolDefaultTrue(c *cli.Context, field string, label string, prev ...bool) bool
- func GetOrAskForEnvironmentVars(c *cli.Context, prev ...map[string]string) map[string]string
- func GetOrAskForSelection(c *cli.Context, field string, label string, items []string, prev ...string) string
- func GetOrRequireAString(c *cli.Context, field, prompt string, validator validateStringMethod, ...) string
- func MultiSelect(c *cli.Context, cnf MultiSelectConfig) (ret []string)
- func PanicIfPromptNotEnabled(prompt string)
- func RenderTable(data [][]string)
- func RenderTableWithMerge(data [][]string)
- func RequiredString(c *cli.Context, prompt string, f stringPromptMethod, prev ...string) string
- func RequiredStringWithValidator(c *cli.Context, prompt string, f stringPromptMethod, ...) (ret string)
- func SelectInterface(names []string, prompt, _default string) (selectedInterface string, err error)
- func SelectInterfaceField(ctx *cli.Context, options []string, field string, prompt string, ...) (selected string, err error)
- func ValidateOk(err error) bool
- type MultiSelectConfig
Constants ¶
View Source
const ( // Prompts BranchPrompt = "Branch:" CommitMessagePrompt = "Commit Message:" DescriptionPrompt = "Description:" EntryPointPrompt = "Entry Point:" MemoryPrompt = "Memory:" PathsPrompt = "Paths [comma separated]:" SizePrompt = "Size:" TTLPrompt = "TTL:" UnitTypePrompt = "Unit type:" TrueSelect = "True" TrueSelectL = "true" FalseSelect = "False" FalseSelectL = "false" TagsPrompt = "Tags [comma separated]:" RegexPrompt = "Use Regex For Match:" LocalPrompt = "Local:" GenerateRepoPrompt = "Generate a Repository:" UseTemplatePrompt = "Use a Template:" SelectTemplatePrompt = "Select a Template:" RepositoryNamePrompt = "Repository Name:" RepositorySelectPrompt = "Select a Repository" ClonePrompt = "Clone this Repository" Domains = "Domains:" EmbedTokenPrompt = "Embed Git Token Into Clone URL:" BranchSelectPrompt = "Select a Branch:" PrivatePrompt = "Private:" SourcePrompt = "Code source:" CodeLanguagePrompt = "Code Language:" CallPrompt = "Entry Point:" TimeoutPrompt = "Time To Live:" NetworkPrompts = "Network:" NoDomainGeneratePrompt = "No domains found, generate one?" // Error messages Required = "Required" MustBeABooleanValue = "Must be a boolean value" FieldNotDefinedInConfig = "field not defined in config: %#v" DoubleStringNotFound = "%s %s not found" StringIsRequired = "%s is required" StringIsNotAValidSelection = "`%s` not a valid selection: %v" InvalidSize = "Invalid size: %s Ex:(10, 10GB, 10PB)" SelectPromptNoOptions = "no options to select from for prompt: %s" NoServiceFromFlag = "unable to find service with selection: (--%s %s)" // Device Errors TagLessThanThreeCharacters = "Tags cannot be less than three characters" )
Variables ¶
View Source
var ( NoServicesDefined = errors.New("no services defined in project config") NoValidDomains = errors.New("no valid domains") )
Errors
View Source
var PromptEnabled = true
View Source
var (
SelectionNone = "(none)"
)
Functions ¶
func ConfirmPrompt ¶
func GetOrAskForAStringValue ¶
func GetOrAskForBool ¶
func GetOrAskForEnvironmentVars ¶
Unused, was used in devices
func GetOrAskForSelection ¶
func GetOrRequireAString ¶
func MultiSelect ¶
func MultiSelect(c *cli.Context, cnf MultiSelectConfig) (ret []string)
func PanicIfPromptNotEnabled ¶
func PanicIfPromptNotEnabled(prompt string)
func RenderTable ¶
func RenderTable(data [][]string)
func RenderTableWithMerge ¶
func RenderTableWithMerge(data [][]string)
func RequiredString ¶
func SelectInterface ¶
func SelectInterfaceField ¶
func ValidateOk ¶
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.