package
11.1.0+incompatible
Repository: https://github.com/fastly/cli.git
Documentation: pkg.go.dev

# Functions

AskYesNo is similar to Input, but the line read is coerced to one of true (yes and its variants) or false (no, its variants and anything else) on success.
Break simply writes a newline to the writer.
BreakN writes n newlines to the writer.
Deprecated is a wrapper for fmt.Fprintf with a bold red "DEPRECATED: " prefix.
Description formats the output of a description item.
Error is a wrapper for fmt.Fprintf with a bold red "ERROR: " prefix.
Important is a wrapper for fmt.Fprintf with a bold yellow "IMPORTANT: " prefix.
Indent writes the help text to the writer using WrapIndent with DefaultTextWidth, suffixed by a newlines.
Info is a wrapper for fmt.Fprintf with a bold "INFO: " prefix.
Input prints the prefix to the writer, and then reads a single line from the reader, trimming writespace.
InputSecure is like Input but doesn't echo input back to the terminal, if and only if r is os.Stdin.
IsFastlyID determines if a string looks like a Fastly ID.
IsStdin returns true if r is standard input.
IsTTY returns true if fd is a terminal.
NewSpinner returns a new instance of a terminal prompt spinner.
NewTable constructs a new Table.
Output writes the help text to the writer using Wrap with DefaultTextWidth, suffixed by a newline.
ParseBreaks returns the linebreak count at the start/end of the input.
PrintAccessKey displays an access key.
PrintAccessKeyTbl displays access keys in a table format.
PrintBackend pretty prints a fastly.Backend structure in verbose format to a given io.Writer.
PrintComputeACL displays a compute ACL.
PrintComputeACLEntriesTbl displays compute ACL entries in a table format.
PrintComputeACLEntry displays a compute ACL entry.
PrintComputeACLsTbl displays compute ACLs in a table format.
PrintConfigStore displays store data and optional metadata (may be nil).
PrintConfigStoreItem displays store item data.
PrintConfigStoreItemsTbl displays store item data in a table format.
PrintConfigStoreServicesTbl displays table of a config store's services.
PrintConfigStoresTbl displays store data in a table format.
PrintDictionary pretty prints a fastly.Dictionary structure in verbose format to a given io.Writer.
PrintDictionaryItem pretty prints a fastly.DictionaryInfo structure in verbose format to a given io.Writer.
PrintDictionaryItemKV pretty prints only the key/value pairs from a dictionary item.
PrintHealthCheck pretty prints a fastly.HealthCheck structure in verbose format to a given io.Writer.
PrintKVStore pretty prints a fastly.Dictionary structure in verbose format to a given io.Writer.
PrintKVStoreKeys pretty prints a list of kv store keys in verbose format to a given io.Writer.
PrintKVStoreKeyValue pretty prints a value from an kv store to a given io.Writer.
PrintLines pretty prints a Lines struct with one item per line.
PrintResource pretty prints a fastly.Resource structure in verbose format to a given io.Writer.
PrintSecret displays store data.
PrintSecretsTbl displays secrets data in a table format.
PrintSecretStore displays store data.
PrintSecretStoresTbl displays store data in a table format.
PrintService pretty prints a fastly.Service structure in verbose format to a given io.Writer.
PrintVersion pretty prints a fastly.Version structure in verbose format to a given io.Writer.
Success is a wrapper for fmt.Fprintf with a bold green "SUCCESS: " prefix.
Warning is a wrapper for fmt.Fprintf with a bold yellow "WARNING: " prefix.
Wrap a string at word boundaries with a maximum line length of width.
WrapIndent a string at word boundaries with a maximum line length of width and indenting the lines by a specified number of spaces.
WrapString produces string with correct wrapping and prefix/suffix linebreaks.

# Constants

DefaultTextWidth is the width that should be passed to Wrap for most general-purpose blocks of text intended for the user.
SpinnerErrWrapper is a generic error message the caller can interpolate their own error into.

# Variables

Bold is a Sprint-class function that makes the arguments bold.
BoldCyan is a Sprint-class function that makes the arguments bold and cyan.
BoldGreen is a Sprint-class function that makes the arguments bold and green.
BoldRed is a Sprint-class function that makes the arguments bold and red.
BoldYellow is a Sprint-class function that makes the arguments bold and yellow.
Prompt is a Sprint-class function that makes the arguments bold and uses the default colour for the terminal.
Reset is a Sprint-class function that resets the color for the arguments.

# Structs

SpinnerWrapper implements the Spinner interface.
Table wraps an instance of a tabwriter and provides helper methods to easily create a table, add a header, add rows and print to the writer.

# Interfaces

Spinner represents a terminal prompt status indicator.

# Type aliases

ColorFn is a function returned from a color.SprintFunc() call.
Lines is the struct that is used by PrintLines.
SpinnerProcess is the logic to execute in between the spinner start/stop.