input

package
v0.0.0-...-151872f Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2019 License: Apache-2.0 Imports: 8 Imported by: 6

Documentation

Overview

Copyright Jetstack Ltd. See LICENSE for details.

Index

Constants

This section is empty.

Variables

View Source
var RegexpClusterName = regexp.MustCompile("^[a-z0-9]+$")
View Source
var RegexpDNS = regexp.MustCompile("^[a-z0-9-\\.]+$")
View Source
var RegexpEnvironmentName = regexp.MustCompile("^[a-z0-9]+$")
View Source
var RegexpProviderName = regexp.MustCompile("^[a-z0-9-]+$")

Functions

This section is empty.

Types

type AskMultipleSelection

type AskMultipleSelection struct {
	AskSelection    *AskSelection
	SelectedChoices []bool
	MinSelected     int
	MaxSelected     int
}

func (*AskMultipleSelection) Question

func (q *AskMultipleSelection) Question() string

type AskOpen

type AskOpen struct {
	Query      string
	AllowEmpty bool
	Default    string
}

func (*AskOpen) Question

func (q *AskOpen) Question() string

type AskSelection

type AskSelection struct {
	Query   string
	Choices []string
	Default int
}

func (*AskSelection) Question

func (q *AskSelection) Question() string

type AskYesNo

type AskYesNo struct {
	Query   string
	Default bool
}

func (*AskYesNo) Option

func (q *AskYesNo) Option() string

func (*AskYesNo) Question

func (q *AskYesNo) Question() string

type Input

type Input struct {
	Prompt string
	// contains filtered or unexported fields
}

func New

func New(i io.Reader, o io.Writer) *Input

func (*Input) AskMultipleSelection

func (i *Input) AskMultipleSelection(question *AskMultipleSelection) (responseSlice []string, err error)

func (*Input) AskOpen

func (i *Input) AskOpen(question *AskOpen) (response string, err error)

func (*Input) AskSelection

func (i *Input) AskSelection(question *AskSelection) (int, error)

func (*Input) AskYesNo

func (i *Input) AskYesNo(question *AskYesNo) (bool, error)

func (*Input) Askf

func (i *Input) Askf(format string, a ...interface{}) (string, error)

func (*Input) Close

func (i *Input) Close()

func (*Input) Warn

func (i *Input) Warn(a ...interface{})

func (*Input) Warnf

func (i *Input) Warnf(format string, a ...interface{})

Jump to

Keyboard shortcuts

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