Versions in this module Expand all Collapse all v0 v0.1.5 Nov 27, 2024 Changes in this version + func FileSerializedDataToMap(filePath valueObject.UnixFilePath) (outputMap map[string]interface{}, err error) v0.1.2 Oct 30, 2024 Changes in this version + func DecryptStr(secretKey, encryptedText string) (decryptedText string, err error) + func EncryptStr(secretKey, plainText string) (encryptedText string, err error) v0.1.0 Oct 9, 2024 Changes in this version + func CopyFile(srcPath string, dstPath string) error + func CreateSelfSignedSsl(dirPath string, vhostName string, aliasesHostname []string) error + func CreateSymlink(sourcePath string, targetPath string, shouldOverwrite bool) error + func DnsLookup(recordName string, recordType *string) ([]string, error) + func DownloadFile(url string, filePath string) error + func EmbedSerializedDataToMap(embed *embed.FS, filePath valueObject.UnixFilePath) (outputMap map[string]interface{}, err error) + func FileExists(filePath string) bool + func GenPass(length int) string + func GenStrongHash(value string) string + func GenStrongShortHash(value string) string + func GenWeakHash(value string) string + func GetAllRegexGroupMatches(input string, regexExpression string) []string + func GetFileContent(filePath string) (string, error) + func GetFilePathWithMatch(dir string, partialMatch string) (string, error) + func GetPrimaryVirtualHost() (valueObject.Fqdn, error) + func GetRegexCapturingGroups(input string, regex string) map[string]string + func GetRootDomain(hostname valueObject.Fqdn) (valueObject.Fqdn, error) + func InstallPkgs(packages []string) error + func IsPrimaryVirtualHost(vhost valueObject.Fqdn) bool + func IsSymlink(sourcePath string) bool + func IsSymlinkTo(sourcePath string, targetPath string) bool + func MakeDir(dirPath string) error + func ReadServerPublicIpAddress() (ipAddress valueObject.IpAddress, err error) + func ReloadWebServer() error + func RemoveSymlink(symlinkPath string) error + func RunCmd(command string, args ...string) (string, error) + func RunCmdWithSubShell(command string) (string, error) + func UpdateFile(filePath string, content string, shouldOverwrite bool) error + func UpdatePermissionsForWebServerUse(filePath string, isRecursive bool, shouldIncludeSymlink bool) error + func ValidateWebServerConfig() error + type CommandError struct + ExitCode int + StdErr string + func (e *CommandError) Error() string