prompt

package
v0.0.0-...-31e061d Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// GCPProjectIDTfLocalName is the name used to store the GCP project ID in main.tf.
	GCPProjectIDTfLocalName = "gcp_project"
	// GCPProjectIDTfLocalName is the name used to store the GCP project ID in main.tf.
	GCPRegionTfLocalName = "gcp_region"
)
View Source
const AWSRegionTfLocalName = "aws_region"

AWSRegionTfLocalName is the name used to store the AWS region in main.tf.

Variables

This section is empty.

Functions

func AWSRegion

func AWSRegion(reader *bufio.Reader, out io.Writer) (string, error)

AWSRegion prompts the user for an AWS region.

func AWSRegionIfNeeded

func AWSRegionIfNeeded(reader *bufio.Reader, out io.Writer, biomeDir string) (string, error)

AWSRegionIfNeeded prompts the user for an AWS region if needed.

func AzureLocationIfNeeded

func AzureLocationIfNeeded(reader *bufio.Reader, out io.Writer, biomeDir string) (string, error)

AzureLocationIfNeeded prompts the user for an Azure location if needed.

func GCPProjectID

func GCPProjectID(reader *bufio.Reader, out io.Writer) (string, error)

GCPProjectID prompts the user for a GCP project ID.

func GCPProjectIDIfNeeded

func GCPProjectIDIfNeeded(reader *bufio.Reader, out io.Writer, biomeDir string) (string, error)

GCPProjectIDIfNeeded prompts the user for a GCP project ID if needed.

func GCPRegion

func GCPRegion(reader *bufio.Reader, out io.Writer) (string, error)

GCPRegion prompts the user for a GCP region.

func GCPStorageLocationIfNeeded

func GCPStorageLocationIfNeeded(reader *bufio.Reader, out io.Writer, biomeDir string) (string, error)

GCPStorageLocationIfNeeded prompts the user for a GCP storage location if needed.

func String

func String(reader *bufio.Reader, out io.Writer, msg, dflt string) (string, error)

String prompts the user to input a string. It outputs msg to out, then prompts the user to enter a value. If the user just hits return, the value defaults to dflt. The function only returns an error if the user enters "cancel" and on I/O errors. TODO(rvangent): Add support for validation? TODO(rvangent): Ctrl-C doesn't work; maybe replace cancel; need to take a ctx. TODO(rvangent): Revisit how prompts looks (multi-line, etc.).

Types

This section is empty.

Jump to

Keyboard shortcuts

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