utils

package
v0.0.0-...-f81bbf2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPasswordMismatch   = errors.New("passwords did not match")
	ErrEncryptionUnknown  = errors.New("unknown encryption format")
	ErrCompressionUnknown = errors.New("unknown compression format")
	ErrLogLevelUnknown    = errors.New("unknown log level")
)

Functions

func CompressionText

func CompressionText(enum int) string

CompressionText returns a user-friendly string indicating the compression algo that was used returns "unknown" when none is found.

func CompressionTypeFromString

func CompressionTypeFromString(s string) (uint16, error)

CompressionTypeFromString returns the compression type from a user-specified string.

func EncryptionText

func EncryptionText(enum int) string

EncryptionText returns a user-friendly string indicating the encryption algo that was used.

func EncryptionTypeFromString

func EncryptionTypeFromString(s string) (uint16, error)

EncryptionTypeFromString returns the encryption type from a user-specified string.

func LogLevelFromString

func LogLevelFromString(s string) (knoxite.LogLevel, error)

LogLevelFromString returns the log level from a user-specified string. returns log level print as default.

func PathToUrl

func PathToUrl(u string) (*url.URL, error)

func ReadPassword

func ReadPassword(prompt string) (string, error)

func ReadPasswordTwice

func ReadPasswordTwice(prompt, promptConfirm string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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