ui

package
v0.1.35 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	InitPrompt       Prompt    = "What would you like to do?"
	InitNew          Selection = "Create new Project"
	InitFromTemplate Selection = "Deploy a starter project"
	InitFromAccount  Selection = "Connect to existing project"
	InitFromID       Selection = "Enter existing project id"
)

Variables

This section is empty.

Functions

func BlueText

func BlueText(payload string) aurora.Value

func Bold

func Bold(text string) string

func Color

func Color(w io.Writer) aurora.Aurora

func GrayText

func GrayText(payload string) aurora.Value

func GreenText

func GreenText(payload string) aurora.Value

func MagentaText

func MagentaText(payload string) aurora.Value

func PromptConfirm added in v0.1.33

func PromptConfirm(msg string) error

func PromptEnvVars added in v0.1.35

func PromptEnvVars(envVars []entity.TemplateEnvVar) (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 PromptStarterTemplates added in v0.1.35

func PromptStarterTemplates() (*entity.Template, error)

PromptStarterTemplates fetches available templates and prompts the user to select one

func PromptText

func PromptText(text string) (string, error)

func RedText

func RedText(payload string) aurora.Value

func StartSpinner

func StartSpinner(cfg *SpinnerCfg)

func StopSpinner

func StopSpinner(msg string)

func YellowText

func YellowText(payload string) aurora.Value

Types

type Prompt

type Prompt string

type Selection

type Selection string

func PromptInit

func PromptInit(isLoggedIn bool) (Selection, error)

type SpinnerCfg

type SpinnerCfg struct {
	Message  string
	Tokens   []string
	Duration time.Duration
}

type TrainSpinner

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

Jump to

Keyboard shortcuts

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