Documentation ¶
Index ¶
- func BufferInsert(buffer bytes.Buffer, target string, content string) bytes.Buffer
- func CalcBackupComponentNames(components []types.BackupIterationComponent) string
- func CalcBackupSize(components []types.BackupIterationComponent) string
- func CalcBackupTimeTaken(status string, createdAt, completedAt time.Time) string
- func CalcRestoreTimeTaken(status string, createdAt, completedAt time.Time) string
- func CalcSyncTimeTaken(status string, createdAt, completedAt time.Time) string
- func CalculateBackupComponents(ogComponents []string) []string
- func CalculateFriendlyETA(eta int) string
- func CalculateRestoreComponents(ogComponents []string) []string
- func CalculateRestoreStrat(strategy string) string
- func CheckCmd(p string) bool
- func DisplayBackupComponentInfo(components []types.BackupIterationComponent)
- func DisplayRestoreComponentInfo(components []types.RestoreRequestResult)
- func DownloadFile(filepath string, url string) error
- func OpenSite(url string) (string, error)
- func OutputJSON(src []byte) error
- func PrintCommandContext(output, login, subAlias, subHash string)
- func PrintErrorJSON(err error)
- func PrintInterfaceAsJSON(data interface{}) error
- func RandomString() (string, error)
- func RemoveStringFromSlice(s []string, r string) []string
- func SliceEqual(a, b []string) bool
- func SliceIncludes(slice []string, val string) bool
- func SliceIncludesAll(a, b []string) bool
- func StringSliceContains(s []string, e string) bool
- func UnixMilliseconds(t time.Time) int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BufferInsert ¶
BufferInsert - Insert content into a buffer at a target string
func CalcBackupComponentNames ¶
func CalcBackupComponentNames(components []types.BackupIterationComponent) string
func CalcBackupSize ¶
func CalcBackupSize(components []types.BackupIterationComponent) string
func CalcBackupTimeTaken ¶
func CalcRestoreTimeTaken ¶
func CalcSyncTimeTaken ¶
func CalculateFriendlyETA ¶
func CalculateRestoreStrat ¶
func DisplayBackupComponentInfo ¶
func DisplayBackupComponentInfo(components []types.BackupIterationComponent)
func DisplayRestoreComponentInfo ¶
func DisplayRestoreComponentInfo(components []types.RestoreRequestResult)
func DownloadFile ¶
DownloadFile - download a url to a local file.
func OutputJSON ¶ added in v1.4.0
func PrintCommandContext ¶ added in v1.4.0
func PrintCommandContext(output, login, subAlias, subHash string)
func PrintErrorJSON ¶ added in v1.4.0
func PrintErrorJSON(err error)
func PrintInterfaceAsJSON ¶ added in v1.4.0
func PrintInterfaceAsJSON(data interface{}) error
func RemoveStringFromSlice ¶
func SliceEqual ¶
SliceEqual tells whether a and b contain the same elements in any order. A nil argument is equivalent to an empty slice.
func SliceIncludes ¶
SliceIncludes tells whether val occurs one time in slice
func SliceIncludesAll ¶
SliceEqual tells whether b contains at least the same elements of a in any order. This is to cater for the edge case there all items may be present in b that are required, but the check would otherwise fail if b contained an additional element not included in a A nil argument is equivalent to an empty slice.
func StringSliceContains ¶
func UnixMilliseconds ¶
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.