Versions in this module Expand all Collapse all v0 v0.4.1 Sep 15, 2020 v0.4.0 Sep 13, 2020 Changes in this version + func SetAppRunMode(appRunMode AppRunMode) + type AppRunMode int + const AppRegularRun + const AppRunReload + func GetAppRunMode() AppRunMode v0.3.3 Nov 24, 2019 Changes in this version + func DivMod(numerator, denominator int64) (quotient, remainder int64) v0.3.2 May 10, 2019 Changes in this version + const KB v0.3.1 Dec 23, 2018 Changes in this version + const EB + const GB + const MB + const MsgAppTitleExtra + const MsgBytesLong + const MsgBytesShort + const MsgDaysLong + const MsgDaysShort + const MsgExaBytesLong + const MsgExaBytesShort + const MsgGigaBytesLong + const MsgGigaBytesShort + const MsgHoursLong + const MsgHoursShort + const MsgKiloBytesLong + const MsgKiloBytesShort + const MsgMegaBytesLong + const MsgMegaBytesShort + const MsgMinutesLong + const MsgMinutesShort + const MsgPetaBytesLong + const MsgPetaBytesShort + const MsgSecondsLong + const MsgSecondsShort + const MsgTeraBytesLong + const MsgTeraBytesShort + const PB + const TB + var APP_ID = "org.d2r2.gorsync" + var SETTINGS_ID = APP_ID + ".Settings" + var SETTINGS_PROFILE_ID = SETTINGS_ID + ".Profile" + var SETTINGS_PROFILE_PATH = "/org/d2r2/gorsync/profiles/%s/" + var SETTINGS_SOURCE_ID = SETTINGS_PROFILE_ID + ".Source" + var SETTINGS_SOURCE_PATH = "/org/d2r2/gorsync/profiles/%s/sources/%s/" + func FindStringSubmatchIndexes(re *regexp.Regexp, s string) map[string][2]int + func FormatDurationToDaysHoursMinsSecs(dur time.Duration, short bool, sections *int) string + func FormatSize(byteCount uint64, short bool) string + func GetAppArchitecture() string + func GetAppExtraTitle() string + func GetAppFullTitle() string + func GetAppTitle() string + func GetAppVersion() string + func GetGolangVersion() string + func GetReadableSize(size FolderSize) string + func GetRelativePath(rootDest, destPath string) (string, error) + func GetRelativePaths(rootDest string, paths []string) ([]string, error) + func MegabytesToBytes(size uint64) uint64 + func Round(x float64) float64 + func RsyncPathJoin(elements ...string) string + func RunExecutableWithExtraVars(path string, env []string, args ...string) (error, int) + func SetBuildNum(buildnum string) + func SetVersion(version string) + func SplitByEOL(text string) []string + type Dir struct + Childs []*Dir + Metrics DirMetrics + Name string + Parent *Dir + Paths SrcDstPath + func BuildDirTree(paths SrcDstPath, ignoreBackupFileSigName string) (*Dir, error) + func (v *Dir) GetContentBackupSize() FolderSize + func (v *Dir) GetFoldersCount() int + func (v *Dir) GetFoldersIgnoreCount() int + func (v *Dir) GetFullBackupSize() FolderSize + func (v *Dir) GetIgnoreSize() FolderSize + func (v *Dir) GetTotalSize() FolderSize + type DirMetrics struct + BackupType FolderBackupType + ChildrenCount int + Depth int + FullSize *FolderSize + IgnoreToBackup bool + Measured bool + Size *FolderSize + type FolderBackupType int + const FBT_CONTENT + const FBT_RECURSIVE + const FBT_SKIP + const FBT_UNKNOWN + func (v FolderBackupType) String() string + type FolderSize int64 + func NewFolderSize(size int64) FolderSize + func (v FolderSize) Add(value FolderSize) FolderSize + func (v FolderSize) AddSizeProgress(value SizeProgress) FolderSize + func (v FolderSize) GetByteCount() uint64 + type ProxyLog struct + func NewProxyLog(child logger.PackageLog, packageName string, packageLen int, timeFormat string, ...) *ProxyLog + func (v *ProxyLog) Debug(args ...interface{}) + func (v *ProxyLog) Debugf(format string, args ...interface{}) + func (v *ProxyLog) Error(args ...interface{}) + func (v *ProxyLog) Errorf(format string, args ...interface{}) + func (v *ProxyLog) Fatal(args ...interface{}) + func (v *ProxyLog) Fatalf(format string, args ...interface{}) + func (v *ProxyLog) Info(args ...interface{}) + func (v *ProxyLog) Infof(format string, args ...interface{}) + func (v *ProxyLog) Notify(args ...interface{}) + func (v *ProxyLog) Notifyf(format string, args ...interface{}) + func (v *ProxyLog) Panic(args ...interface{}) + func (v *ProxyLog) Panicf(format string, args ...interface{}) + func (v *ProxyLog) Print(level logger.LogLevel, args ...interface{}) + func (v *ProxyLog) Printf(level logger.LogLevel, format string, args ...interface{}) + func (v *ProxyLog) Warn(args ...interface{}) + func (v *ProxyLog) Warnf(format string, args ...interface{}) + func (v *ProxyLog) Warning(args ...interface{}) + func (v *ProxyLog) Warningf(format string, args ...interface{}) + type SizeProgress struct + Completed *FolderSize + Failed *FolderSize + Skipped *FolderSize + func NewProgressCompleted(size FolderSize) SizeProgress + func NewProgressFailed(size FolderSize) SizeProgress + func NewProgressSkipped(size FolderSize) SizeProgress + func (this *SizeProgress) Add(size SizeProgress) + func (this *SizeProgress) GetTotal() FolderSize + type SrcDstPath struct + DestPath string + RsyncSourcePath string + func (v SrcDstPath) Join(item string) SrcDstPath + type WriteLine func(line string) error