tui

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2020 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewUserFlow = []*survey.Question{
	{
		Name: "register",
		Prompt: &survey.Confirm{
			Message: "metadata.json was not found in the current directory, do you want to register and create one now?",
		},
		Validate: survey.Required,
	},
}

NewUserFlow is the TUI flow used when lighthouse metadata is missing

Functions

func Abs

func Abs(x int) int

Abs gives the absolute value of the int

func AlreadyRegisteredFlow

func AlreadyRegisteredFlow(metadata models.Metadata, launchDesktopApp bool)

AlreadyRegisteredFlow is run when metadata.json is present

func GenerateASCIIArt

func GenerateASCIIArt()

GenerateASCIIArt prints the lighthouse onto the screen

func Spinner

func Spinner(done chan bool, loading, loaded string)

Spinner creates a terminal loading prompt

func StartNewUserFlow

func StartNewUserFlow()

StartNewUserFlow starts the TUI flow and registers the user

Types

type NewUserAnswers

type NewUserAnswers struct {
	Register bool
}

NewUserAnswers contains the answers from NewUserFlow

Jump to

Keyboard shortcuts

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