console

package
v2.0.0-...-b10c7ac Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2025 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package console provides utilities for console-based user interaction.

Package console provides utilities for console-based user interaction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadPassword

func ReadPassword(name string) ([]byte, error)

Types

type InputHandler

type InputHandler struct{}

InputHandler provides methods to handle user input for authentication.

func NewInputHandler

func NewInputHandler() InputHandler

NewInputHandler creates a new InputHandler.

func (InputHandler) GetOTP

func (h InputHandler) GetOTP() (string, error)

GetOTP prompts the user to enter their one-time password (OTP).

func (InputHandler) GetPIN

func (h InputHandler) GetPIN() (string, error)

GetPIN prompts the user to enter their PIN.

func (InputHandler) GetPhoneNumber

func (h InputHandler) GetPhoneNumber() (string, error)

GetPhoneNumber prompts the user to enter their phone number.

type InputHandlerInterface

type InputHandlerInterface interface {
	// GetPhoneNumber prompts the user to enter their phone number.
	GetPhoneNumber() (string, error)

	// GetPIN prompts the user to enter their PIN.
	GetPIN() (string, error)

	// GetOTP prompts the user to enter their one-time password (OTP).
	GetOTP() (string, error)
}

InputHandlerInterface defines methods for handling user input for authentication.

Jump to

Keyboard shortcuts

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