prompt

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confirm

func Confirm(label string) bool

Confirm prompts for Y/N question with label and returns true or false for confirmation

func ForMaintainer

func ForMaintainer() (*kudoapi.Maintainer, error)

ForMaintainer prompts to gather information to add an operator maintainer

func ForOperator

func ForOperator(fs afero.Fs, pathDefault string, overwrite bool, operatorDefault packages.OperatorFile) (*packages.OperatorFile, string, error)

ForOperator prompts to gather details for a new operator

func ForParameter

func ForParameter(planNames []string, paramNameList []string) (*packages.Parameter, error)

ForParameter prompts to gather information to add an operator parameter

func ForPlan

func ForPlan(planNames []string, tasks []kudoapi.Task, fs afero.Fs, path string, createTaskFun func(fs afero.Fs, path string, taskName string) error) (string, *kudoapi.Plan, error)

func ForTask

func ForTask(name string) (*kudoapi.Task, error)

ForTask prompts to gather information to add new task to operator

func ForTaskName

func ForTaskName(existingTasks []kudoapi.Task) (string, error)

func WithDefault

func WithDefault(label string, defaultStr string) (string, error)

WithDefault prompts for a response to a label

func WithOptions

func WithOptions(label string, options []string, addLabel string) (string, error)

WithOptions prompts for option selection, first element in slice is default

func WithValidator

func WithValidator(label string, defaultStr string, validate promptui.ValidateFunc) (string, error)

WithValidator prompts for a response to a label with a validation function

Types

This section is empty.

Jump to

Keyboard shortcuts

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