You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/content/2.docs/2.hooks.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -35,12 +35,14 @@ Variables
35
35
-`SnapshotId:string` - the snapshot ID associated with the operation or empty string if none is associated.
36
36
-`SnapshotStats:restic.BackupProgressEntry` - summary of the current backup operation. This is a struct. See examples below for details.
37
37
-`CurTime:time.Time` - the current time. This is a struct. Format as `{{ .FormatTime .CurTime }}`.
38
+
-`Duration:time.Duration` - the duration of the triggering operation. Format as `{{ .FormatDuration .Duration }}`.
38
39
-`Error:string` - the error message if an error occurred, or empty string if successful.
39
40
40
41
Functions
41
42
42
43
-`.Summary` - prints a default summary of the current event.
43
-
-`.FormatTime <time>` - formats a time.Time object e.g. as `2024-02-08T03:00:37Z`
44
+
-`.FormatTime <time>` - formats a time.Time object e.g. as `2024-02-08T03:00:37Z`.
45
+
-`.FormatDuration <duration>` - formats a time.Duration object e.g. as `1h2m3s`.
44
46
-`.FormatSizeBytes <int>` - formats a number as a size in bytes (e.g. 5MB, 10GB, 30TB, etc...)
45
47
-`.ShellEscape <string>` - escapes a string to safely be used in most shell environments. Should not be relied upon as secure for arbitrary input.
46
48
-`.JsonMarshal <any>` - attempts to marshall any value as JSON. Can also be used with literals e.g. to quote a string with escapes i.e. `hello"world` -becomes `"hello\"world"`.
0 commit comments