Documentation
¶
Overview ¶
Package ask answers the protocol's password, question, cached-password and keystroke requests from what is typed: prompts queue and show one at a time, oldest first, every password typed is cached for the next disk, and every buffer that held a secret is zeroed once it is no longer needed.
Index ¶
- type Asker
- func (a *Asker) Cached(r Replier) error
- func (a *Asker) Close() error
- func (a *Asker) HangUp(c Conn)
- func (a *Asker) Ignore(keys string) error
- func (a *Asker) Key(k key.Key) error
- func (a *Asker) Password(r Replier, c Conn, prompt string)
- func (a *Asker) Prompt() theme.Prompt
- func (a *Asker) Question(r Replier, c Conn, prompt string)
- func (a *Asker) Watch(r Replier, c Conn, keys string)
- type Conn
- type Replier
- type Secret
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Asker ¶
type Asker struct {
// contains filtered or unexported fields
}
Asker is the queue of prompts, the text typed into the one showing, the cached passwords and the keystroke watches. It is not safe for concurrent use.
func (*Asker) Cached ¶
Cached answers r with every password typed so far, or NO_ANSWER when there is none.
func (*Asker) Close ¶
Close answers every prompt and watch still waiting NO_ANSWER and zeroes the text typed and every cached password, as the daemon quits.
func (*Asker) HangUp ¶
HangUp drops every prompt and watch of c, whose client is gone. A prompt showing closes and what was typed into it is zeroed.
func (*Asker) Key ¶
Key applies a key press: to the prompt showing, or else to the first watch it matches. Escape belongs to the boot messages and is ignored here.
func (*Asker) Prompt ¶
Prompt is what the splash shows of the prompt in front: its question and a bullet per character typed for a password, or the text for a question.
type Conn ¶
type Conn any
Conn identifies the connection a request came in on, so a hang-up drops every request of that connection.