passprompt

package
v7.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Login

func Login(login LoginFunc, getter PasswordGetter, keyringService, keyringUser, initialPrompt, failPrefix string) error

Types

type LoginFunc

type LoginFunc func(string) (bool, error)

type PasswordGetter

type PasswordGetter interface {
	// Print the given prompt and retrieve a password. May return io.EOF if the
	// user cancels the prompt.
	GetPasswd(prompt string) (string, error)
}

Interface for some means of getting a password from the user (or another source)

type PasswordPrompt

type PasswordPrompt struct{}

A default password getter using stdin/stderr

func (PasswordPrompt) GetPasswd

func (PasswordPrompt) GetPasswd(prompt string) (string, error)

Jump to

Keyboard shortcuts

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