...

Package passprompt

import "github.com/sassoftware/relic/lib/passprompt"
Overview
Index

Overview ▾

func Login

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

type LoginFunc

type LoginFunc func(string) (bool, error)

type PasswordGetter

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

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)
}

type PasswordPrompt

A default password getter using stdin/stderr

type PasswordPrompt struct{}

func (PasswordPrompt) GetPasswd

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