prompt

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MsgConfirmOverride     = "The key already exists. Do you want to override it"
	MsgConfirmContinue     = "Do you want to continue"
	MsgConfirmAddition     = "Do you want to add this key to your config file"
	MsgPromptKeyType       = "Select the type of key you want to generate"
	MsgPromptKeyComplexity = "Select the key complexity"
	MsgPromptKeyDirectory  = "Enter the directory"
	MsgPromptKeyFilename   = "Enter the file name"
	MsgPromptKeyPassphrase = "Enter the passphrase"
	MsgPromptKeyHost       = "Enter the host to which you want to associate this key"
	MsgPromptKeyPort       = "Enter the port"
	MsgPromptKeyUser       = "Enter the user"
	MsgGeneratingKeys      = "Generating SSH keys..."
	MsgKeyGenerated        = "The SSH keys were generated successfully!"
	MsgConfigGenerated     = "The SSH key was added to your config file"
	MsgPromptChooseSection = "Select the Host section you want to remove"
	MsgConfirmDeleteFiles  = "Do you want to delete those files"
	MsgConfirmDeleteLines  = "Do you want to delete(d) or comment(c) those lines?"
)

Prompt messages

Variables

This section is empty.

Functions

func ConfigFlow added in v0.0.4

func ConfigFlow(p *Prompt, k string) (*config.Generated, error)

ConfigFlow prompts user to get the configuration options

func KeyFlow added in v0.0.4

func KeyFlow(p *Prompt) (*keys.Options, error)

KeyFlow prompts user to get the keys options

Types

type Prompt

type Prompt struct {
	// contains filtered or unexported fields
}

Prompt the user

func New added in v0.4.0

func New(t *template.Templates) *Prompt

New creates a new prompt

func (*Prompt) Confirm added in v0.4.0

func (p *Prompt) Confirm(t string) (bool, error)

Confirm asks for user confirmation

func (*Prompt) Msg added in v0.4.0

func (p *Prompt) Msg(m string) error

Msg output a message in the console

func (*Prompt) Prompt added in v0.4.0

func (p *Prompt) Prompt(t string, d string) (string, error)

Prompt prompts user

Jump to

Keyboard shortcuts

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