input

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfirmation

func GetConfirmation(prompt, allowFor string) (bool, error)

func GetHiddenInput

func GetHiddenInput(prompt string) ([]byte, error)

func GetMultiLineHiddenInput

func GetMultiLineHiddenInput(prompt string) (input []byte, err error)

func GetVisibleInput

func GetVisibleInput(prompt string) (string, error)

func IsInteractive

func IsInteractive() error

func NewPasswordFromUser

func NewPasswordFromUser(policy *PasswordPolicy) ([]byte, error)

func ReadBufferFromStdin

func ReadBufferFromStdin(prompt string) ([]byte, error)

Types

type PasswordPolicy

type PasswordPolicy struct {
	MinLength       uint8
	MinUppercase    uint8
	MinLowercase    uint8
	MinDigits       uint8
	MinSpecialChars uint8
}

func DefaultPasswordPolicy

func DefaultPasswordPolicy() *PasswordPolicy

func (*PasswordPolicy) Validate

func (policy *PasswordPolicy) Validate(password string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳