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 ¶
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.
Click to show internal directories.
Click to hide internal directories.