Documentation ¶
Index ¶
- Variables
- func BuildEPKHandleError(tempDir string, err error, vagueError error, logger *lib.Logger)
- func BuildEPKRemoveTemporaryDirectory(tempDir string, logger *lib.Logger)
- func EternityJsonHandleError(err error, vagueError error, logger *lib.Logger)
- func GenerateRepositoryHandleError(err error, vagueError error, logger *lib.Logger)
- func LoadPrivateKey(logger *lib.Logger) (ed25519.PrivateKey, error, error)
- func LoadPrivateKeyHandleError(err error, vagueError error, logger *lib.Logger)
- func PackageEPKHandleError(err error, vagueError error, logger *lib.Logger)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultLogger = lib.Logger{ LogFunc: func(log lib.Log) string { var severityPretty string switch log.Level { case "INFO": severityPretty = color.GreenString("[INFO]") case "WARN": severityPretty = color.YellowString("[WARN]") case "ERROR": severityPretty = color.HiYellowString("[ERROR]") case "CRITICAL": severityPretty = color.HiRedString("[CRITICAL]") case "FATAL": fmt.Println(color.RedString("[FATAL]"), log.Content) os.Exit(1) default: severityPretty = color.WhiteString("[" + strings.ToUpper(log.Level) + "]") } fmt.Println(severityPretty, log.Content) if log.Prompt { fmt.Print(": ") reader := bufio.NewReader(os.Stdin) userInput, err := reader.ReadString('\n') if err != nil { fmt.Println(color.RedString("[FATAL]"), "Failed to read user input:", err) os.Exit(1) } else { return userInput[:len(userInput)-1] } } return "" }, PromptSupported: true, StdoutSupported: true, Stdout: os.Stdout, }
View Source
var LoadPrivateKeyEmptyBlockError = errors.New("blocks returned by pem.Decode are empty")
View Source
var LoadPrivateKeyFolderCreateError = errors.New("failed to create folder")
View Source
var LoadPrivateKeyGenerateError = errors.New("failed to generate private key")
View Source
var LoadPrivateKeyHomedirError = errors.New("failed to get home directory")
View Source
var LoadPrivateKeyMarshalError = errors.New("failed to marshal private key")
View Source
var LoadPrivateKeyNotEd25519Error = errors.New("private key is not ed25519")
View Source
var LoadPrivateKeyParseError = errors.New("failed to parse private key")
View Source
var LoadPrivateKeyReadError = errors.New("failed to read private key")
View Source
var LoadPrivateKeyWriteError = errors.New("failed to write private key")
Functions ¶
func BuildEPKHandleError ¶
BuildEPKHandleError handles errors related to the building of EPKs
func BuildEPKRemoveTemporaryDirectory ¶
BuildEPKRemoveTemporaryDirectory removes the temporary directory created by BuildEPK
func EternityJsonHandleError ¶
EternityJsonHandleError handles errors related to the parsing of eternity.json
func LoadPrivateKey ¶
LoadPrivateKey loads the private key from $HOME/.local/share/eternity/private.key
func LoadPrivateKeyHandleError ¶
LoadPrivateKeyHandleError handles errors related to LoadPrivateKey
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.