internal

package
v0.0.0-...-b318006 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExist

func FileExist(fn string) (bool, error)

FileExist check if the specified file exists

func GetAbsolutePath

func GetAbsolutePath(fn string) (string, error)

GetAbsolutePath return the absolute path of the specified file.

func GetEncryptedSecretPhrase

func GetEncryptedSecretPhrase(fn string) (string, error)

GetEncryptedSecretPhrase get secret phrase from an RSA (base64)encrypted string

func GetMultilineText

func GetMultilineText(cols uint) (string, error)

GetMultilineText read multiline text from terminal.

func GetSecretPhrase

func GetSecretPhrase() (string, error)

GetSecretPhrase read a password entry from terminal.

func GetSecretPhraseDoubleCheck

func GetSecretPhraseDoubleCheck() (string, error)

GetSecretPhraseDoubleCheck read a password entry from terminal. This routine ask for the password twice in order to be sure.

func NewFileAlreadyExistError

func NewFileAlreadyExistError(fn string) error

NewFileAlreadyExistError build a file already exist error message

func NewFileNotFoundError

func NewFileNotFoundError(fn string) error

NewFileNotFoundError build a file not found error message

func NewMissingParameterError

func NewMissingParameterError(param, cmdName string) error

NewMissingParameterError build a file already exist error message

func TruncateText

func TruncateText(s string, i int) string

TruncateText truncate the specified string at defined number of chars

Types

type AuthenticationError

type AuthenticationError struct {
	// contains filtered or unexported fields
}

AuthenticationError return an authentication failure message

func (AuthenticationError) Error

func (e AuthenticationError) Error() string

type FileAlreadyExistError

type FileAlreadyExistError struct {
	// contains filtered or unexported fields
}

FileAlreadyExistError return a file already exist error message

func (FileAlreadyExistError) Error

func (e FileAlreadyExistError) Error() string

type FileNotFoundError

type FileNotFoundError struct {
	// contains filtered or unexported fields
}

FileNotFoundError return a file not found error message

func (FileNotFoundError) Error

func (e FileNotFoundError) Error() string

type MissingParameterError

type MissingParameterError struct {
	// contains filtered or unexported fields
}

MissingParameterError return a missed option or argument error message

func (MissingParameterError) Error

func (e MissingParameterError) Error() string

Jump to

Keyboard shortcuts

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