package
0.0.0-20241105020827-5ee4692b52b5
Repository: https://github.com/digitalautonomy/wahay.git
Documentation: pkg.go.dev

# Functions

CheckPort returns boolean indicating if the port is valid or not.
CreateKeySupplier wraps a function for returning the encryption key.
CreateTempDir creates a temp dir inside Wahay's data dir.
DetectLanguage determine the language used in the host computer.
Dir returns the default config directory for Wahay.
EnsureDir creates a directory if not exists.
EnsureFilesAndDir ensure Wahay's required files and/or directories.
FileExists check if a specific file exists.
GenerateKeysBasedOnPassword takes a password and encryption parameters and generates an AES key and a MAC key using SCrypt.
GetDefaultLogFile returns the default path for the log file.
GetDefaultLogFileName returns the default filename for the log file.
GetRandomPort returns an available random port.
No description provided by the author
New creates a new instance of the application config struct.
ProcessCommandLineArguments will parse the command line, check that required values are given and exit otherwise.
RandomPort returns a random port.
RandomString returns a string randomly generated.
ReadFileOrTemporaryBackup tries to load a specific file.
RemoveAll removes a directory and it's children.
SafeWrite is a helper function to write content on specific file.
SystemConfigDir returns the application data directory, valid on both windows and posix systems.
TorDir returns the directory path for Tor.
WithHome returns the given relative file/dir with the $HOME prepended.
XdgDataHome returns the standardized XDG Data directory.

# Constants

DefaultControlPort is the port Tor uses by default for the control port.
DefaultHost is where Tor is hosted.
DefaultRoutePort is the port Tor uses by default.

# Variables

Debug contains the command line argument given for debugging.
DebugFunctionCalls contains the command line argument given for debugging.
TorControlPassword contains the command line argument given for the Tor control port password.
TorHost contains the command line argument given for the Tor host.
TorPort contains the command line argument given for the Tor port.
TorRoutePort contains the command line argument given for the Tor route port.
Trace contains the command line argument given for debugging.
Version contains the command line argument given for version.
No description provided by the author

# Structs

ApplicationConfig contains the configuration for the application.
EncryptionParameters contains the parameters used for scrypting the password and encrypting the configuration file.
EncryptionResult is a representation of a result provided by the encryption functionality for the configuration system.

# Interfaces

KeySupplier is a function that can be used to get key data from the user.

# Type aliases

No description provided by the author