input

package
v0.0.0-...-555af49 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Encrypt cryptoOperation = "encrypt"
	Decrypt cryptoOperation = "decrypt"
)

Variables

View Source
var (
	ErrInvalidOperation = errors.New("invalid operation. Please choose 'encrypt' or 'decrypt'")
)

ErrInvalidOperation is returned when the user enters an invalid operation.

View Source
var ErrSecretTooShort = errors.New("the secret key must be at least 11 characters long")

ErrSecretTooShort is returned when the secret key is less than 11 characters long.

Functions

This section is empty.

Types

type UserInput

type UserInput struct {
	Operation cryptoOperation
	Path,
	OutputPath,
	Secret string
}

UserInput defines the structure for user input.

func User

func User() (UserInput, error)

User prompts the user to enter the operation, input file path, output file path, and secret key.

Jump to

Keyboard shortcuts

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