terminal

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package terminal implements I/O operations used to get and display information to the user.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidPassword = errors.New("invalid password")

ErrInvalidPassword is used to identify the error received when editing an entry.

Functions

func Confirm

func Confirm(r io.Reader, message string) bool

Confirm requests the user for a yes/no response.

func DisplayQRCode

func DisplayQRCode(secret string) error

DisplayQRCode creates a qr code with the password provided and writes it to the terminal.

func ScanPassword

func ScanPassword(message string, verify bool) (*memguard.Enclave, error)

ScanPassword returns the input password encrypted inside an Enclave.

func Scanln

func Scanln(r *bufio.Reader, field string) string

Scanln scans a single line and returns the input.

func Scanlns

func Scanlns(r *bufio.Reader, field string) string

Scanlns scans multiple lines and returns the input.

func Ticker

func Ticker(done chan struct{}, hiddenCursor bool, log func())

Ticker clears the terminal and executes the log function every second.

Types

This section is empty.

Jump to

Keyboard shortcuts

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