ui

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlertDanger added in v0.2.0

func AlertDanger(text string) string

func AlertInfo added in v0.2.0

func AlertInfo(text string) string

func AlertWarning added in v0.2.0

func AlertWarning(text string) string

func BlockQuote added in v0.2.0

func BlockQuote(text string) string

BlockQuote adds two space characters to the start of every line in the text

func BlueText

func BlueText(payload string) _aurora.Value

func Bold

func Bold(payload string) _aurora.Value

func GrayText

func GrayText(payload string) _aurora.Value

func GreenText

func GreenText(payload string) _aurora.Value

func Heading added in v0.2.0

func Heading(text string) string

func Indent added in v0.2.0

func Indent(text string) string

Indent adds two space characters to the start of every line in the text

func KeyValues added in v0.2.0

func KeyValues(items map[string]string) string

func LightGrayText added in v0.2.0

func LightGrayText(payload string) _aurora.Value

func MagentaText

func MagentaText(payload string) _aurora.Value

func ObscureText added in v0.2.0

func ObscureText(text string) string

func OrderedList added in v0.2.0

func OrderedList(items []string) string

func Paragraph added in v0.2.0

func Paragraph(text string) string

Paragraph automatically wraps text (by word) to 60 chars

func PrefixLines added in v0.2.0

func PrefixLines(text, prefix string) string

PrefixLines adds a string to the start of every line in the text

func PromptConfirmProjectName added in v0.2.44

func PromptConfirmProjectName() (string, error)

func PromptEnvVars added in v0.1.35

func PromptEnvVars(envVars []*entity.StarterEnvVar) (map[string]string, error)

func PromptEnvironments

func PromptEnvironments(environments []*entity.Environment) (*entity.Environment, error)

func PromptGitHubScopes added in v0.1.35

func PromptGitHubScopes(scopes []string) (string, error)

PromptGitHubScopes prompts the user to select one of the provides scopes

func PromptIsRepoPrivate added in v0.1.35

func PromptIsRepoPrivate() (bool, error)

func PromptPlugins

func PromptPlugins(plugins []string) (string, error)

func PromptProjectName added in v0.1.35

func PromptProjectName() (string, error)

func PromptProjects

func PromptProjects(projects []*entity.Project) (*entity.Project, error)

func PromptServices added in v0.3.0

func PromptServices(services []*entity.Service) (*entity.Service, error)

func PromptStarterTemplates added in v0.1.35

func PromptStarterTemplates(starters []*entity.Starter) (*entity.Starter, error)

PromptStarterTemplates prompts the user to select one of the provided starter templates

func PromptText

func PromptText(text string) (string, error)

func PromptYesNo added in v0.2.0

func PromptYesNo(msg string) (bool, error)

PromptYesNo prompts the user to continue an action using the common (y/N) action

func RedText

func RedText(payload string) _aurora.Value

func StartSpinner

func StartSpinner(cfg *SpinnerCfg)

func StopSpinner

func StopSpinner(msg string)

func SupportsANSICodes added in v1.7.0

func SupportsANSICodes() bool

func Truncate added in v0.2.0

func Truncate(text string, maxLength int) string

func UnorderedList added in v0.2.0

func UnorderedList(items []string) string

func VerboseInfo added in v1.2.2

func VerboseInfo(isVerbose bool, text string) string

func YellowText

func YellowText(payload string) _aurora.Value

Types

type Prompt

type Prompt string

type Selection

type Selection string
const (
	InitNew          Selection = "Empty Project"
	InitFromTemplate Selection = "Starter Template"
)

func PromptInit

func PromptInit() (Selection, error)

type SpinnerCfg

type SpinnerCfg struct {
	// Message specifies the text label that appears while loading
	Message string
	// Tokens is a list of emoji to rotate through, during loading
	Tokens []string
	// Duration is the amount of delay between each spinner "frame"
	Duration time.Duration
}

type TrainSpinner

type TrainSpinner []string
var (
	TrainEmojis TrainSpinner = []string{"🚝", "🚅", "🚄", "🚇", "🚞", "🚈", "🚉", "🚂", "🚃", "🚊", "🚋"}
)

Jump to

Keyboard shortcuts

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