Documentation
¶
Index ¶
- func DurationToHoursAndMinutes(duration time.Duration) string
- func FormatDate(date time.Time, timeZone string) string
- func GetDirSize(path string) (float64, error)
- func GetDurationTillTime(start time.Time, duration time.Duration) (time.Duration, error)
- func GetVolumeSize(volumeName string) (float64, error)
- func ParseEpochTime(epoch string) (*time.Time, error)
- func ParseIntFromString(str string) (int, error)
- func StringMsToDuration(durationString string) (time.Duration, error)
- type NetworkUsage
- type UsageData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DurationToHoursAndMinutes ¶
DurationToHoursAndMinutes converts a duration in milliseconds to a formatted string representing hours and minutes.
func FormatDate ¶
FormatDate formats a time.Time value to a string using a specific date and time layout string and the specified time zone.
func GetDirSize ¶
func GetDurationTillTime ¶
GetDurationTillTime calculates the duration between a specified start time and the current time and returns it as a time.Duration value.
func GetVolumeSize ¶
func ParseEpochTime ¶
ParseEpochTime parses a string representing an epoch time and returns a pointer to a time.Time value.
func ParseIntFromString ¶
ParseIntFromString extracts the integer part from a string that may have a suffix. The suffix can be any non-digit characters at the end of the string. If the string cannot be parsed, an error is returned.
Types ¶
type NetworkUsage ¶
func GetNetworkUsage ¶
func GetNetworkUsage() (*NetworkUsage, error)