ui

package
v0.1.30 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	InitPrompt      Prompt    = "What would you like to do?"
	InitNew         Selection = "Create new 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 PromptEnvironments

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

func PromptPlugins

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

func PromptProjects

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

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