github.com/argoproj/argo-cd/v3@v3.2.1/docs/operator-manual/notifications/functions.md (about) 1 ### **time** 2 Time related functions. 3 4 <hr> 5 **`time.Now() Time`** 6 7 Executes function built-in Golang [time.Now](https://golang.org/pkg/time/#Now) function. Returns an instance of 8 Golang [Time](https://golang.org/pkg/time/#Time). 9 10 <hr> 11 **`time.Parse(val string) Time`** 12 13 Parses specified string using RFC3339 layout. Returns an instance of Golang [Time](https://golang.org/pkg/time/#Time). 14 15 <hr> 16 Time related constants. 17 18 **Durations** 19 20 ``` 21 time.Nanosecond = 1 22 time.Microsecond = 1000 * Nanosecond 23 time.Millisecond = 1000 * Microsecond 24 time.Second = 1000 * Millisecond 25 time.Minute = 60 * Second 26 time.Hour = 60 * Minute 27 ``` 28 29 **Timestamps** 30 31 Used when formatting time instances as strings (e.g. `time.Now().Format(time.RFC3339)`). 32 33 ``` 34 time.Layout = "01/02 03:04:05PM '06 -0700" // The reference time, in numerical order. 35 time.ANSIC = "Mon Jan _2 15:04:05 2006" 36 time.UnixDate = "Mon Jan _2 15:04:05 MST 2006" 37 time.RubyDate = "Mon Jan 02 15:04:05 -0700 2006" 38 time.RFC822 = "02 Jan 06 15:04 MST" 39 time.RFC822Z = "02 Jan 06 15:04 -0700" // RFC822 with numeric zone 40 time.RFC850 = "Monday, 02-Jan-06 15:04:05 MST" 41 time.RFC1123 = "Mon, 02 Jan 2006 15:04:05 MST" 42 time.RFC1123Z = "Mon, 02 Jan 2006 15:04:05 -0700" // RFC1123 with numeric zone 43 time.RFC3339 = "2006-01-02T15:04:05Z07:00" 44 time.RFC3339Nano = "2006-01-02T15:04:05.999999999Z07:00" 45 time.Kitchen = "3:04PM" 46 // Handy time stamps. 47 time.Stamp = "Jan _2 15:04:05" 48 time.StampMilli = "Jan _2 15:04:05.000" 49 time.StampMicro = "Jan _2 15:04:05.000000" 50 time.StampNano = "Jan _2 15:04:05.000000000" 51 ``` 52 53 ### **strings** 54 String related functions. 55 56 <hr> 57 **`strings.ReplaceAll() string`** 58 59 Executes function built-in Golang [strings.ReplaceAll](https://pkg.go.dev/strings#ReplaceAll) function. 60 61 <hr> 62 **`strings.ToUpper() string`** 63 64 Executes function built-in Golang [strings.ToUpper](https://pkg.go.dev/strings#ToUpper) function. 65 66 <hr> 67 **`strings.ToLower() string`** 68 69 Executes function built-in Golang [strings.ToLower](https://pkg.go.dev/strings#ToLower) function. 70 71 ### **sync** 72 73 <hr> 74 **`sync.GetInfoItem(app map, name string) string`** 75 Returns the `info` item value by given name stored in the Argo CD App sync operation. 76 77 ### **repo** 78 Functions that provide additional information about Application source repository. 79 <hr> 80 **`repo.RepoURLToHTTPS(url string) string`** 81 82 Transforms given GIT URL into HTTPs format. 83 84 <hr> 85 **`repo.FullNameByRepoURL(url string) string`** 86 87 Returns repository URL full name `(<owner>/<repoName>)`. Currently supports only Github, GitLab and Bitbucket. 88 89 <hr> 90 **`repo.QueryEscape(s string) string`** 91 92 QueryEscape escapes the string, so it can be safely placed inside a URL 93 94 Example: 95 ``` 96 /projects/{{ call .repo.QueryEscape (call .repo.FullNameByRepoURL .app.status.RepoURL) }}/merge_requests 97 ``` 98 99 <hr> 100 **`repo.GetCommitMetadata(sha string) CommitMetadata`** 101 102 Returns commit metadata. The commit must belong to the application source repository. `CommitMetadata` fields: 103 104 * `Message string` commit message 105 * `Author string` - commit author 106 * `Date time.Time` - commit creation date 107 * `Tags []string` - Associated tags 108 109 <hr> 110 **`repo.GetAppDetails() AppDetail`** 111 112 Returns application details. `AppDetail` fields: 113 114 * `Type string` - AppDetail type 115 * `Helm HelmAppSpec` - Helm details 116 * Fields : 117 * `Name string` 118 * `ValueFiles []string` 119 * `Parameters []*v1alpha1.HelmParameter` 120 * `Values string` 121 * `FileParameters []*v1alpha1.HelmFileParameter` 122 * Methods : 123 * `GetParameterValueByName(Name string)` Retrieve value by name in Parameters field 124 * `GetFileParameterPathByName(Name string)` Retrieve path by name in FileParameters field 125 * 126 * `Kustomize *apiclient.KustomizeAppSpec` - Kustomize details 127 * `Directory *apiclient.DirectoryAppSpec` - Directory details