Documentation ¶
Index ¶
- Variables
- func BinPath() string
- func BinaryExists(name string) bool
- func CertDir() string
- func CertutilPath() (string, error)
- func CheckUpdates()
- func ChmodR(path string, mode os.FileMode) error
- func CleanSlice(s []string) []string
- func ConfigDir() string
- func CreateDirectory(path string) error
- func CreateTemplates(overwrite bool) error
- func GetCompose() (string, string)
- func HomeDir() (string, error)
- func HumanSize(size float64) string
- func IsAptInstall() bool
- func IsBinFileExists() bool
- func IsCertPathExists() bool
- func IsNeedInstall() bool
- func PathExists(path string) bool
- func RemoveFilesInPath(path string)
- func RemovePath(path string) error
- func TemplateDir() string
- func ToAvailablePercent(size uint64, total uint64) float64
- func WpdeployCheck() bool
- type Disk
Constants ¶
This section is empty.
Variables ¶
var Templates embed.FS
Templates directory
Functions ¶
func BinaryExists ¶
BinaryExists check for the existence of a binary file
func CertutilPath ¶
CertutilPath determine the path to the certutil
func CreateDirectory ¶
CreateDirectory recursively create directories
func CreateTemplates ¶
CreateTemplates create docker-compose files
func GetCompose ¶
GetCompose get link to executable file and arguments
func IsCertPathExists ¶
func IsCertPathExists() bool
IsCertPathExists check if the certificate directory exists
func IsNeedInstall ¶
func IsNeedInstall() bool
IsNeedInstall checking for the existence of a configuration file
func RemoveFilesInPath ¶
func RemoveFilesInPath(path string)
RemoveFilesInPath deleting files in a directory
func TemplateDir ¶
func TemplateDir() string
TemplateDir template directory (~/.config/dl/templates)
func ToAvailablePercent ¶
ToAvailablePercent calculate free percent
Types ¶
type Disk ¶
func CheckFreeSpace ¶
CheckFreeSpace free space of the specified directory
func (Disk) CalculateSpaceBeforeDeploy ¶
CalculateSpaceBeforeDeploy calculate free space before deployment
func (Disk) GetPercentFree ¶
GetPercentFree free space percentage