Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // gentime function maps GenTimeFunctions = template.FuncMap{ "add": func(a int, b int) int { log.Debug("Calling Template Function [add] with arguments: %s + %s", a, b) return a + b }, "strip": func(s string, rmv string) string { log.Debug("Calling Template Function [strip] with arguments: (%s, %s) ", s, rmv) return strings.Replace(s, rmv, "", -1) }, "cat": func(path string) string { log.Debug("Calling Template Function [cat] with arguments: %s", path) b, err := ioutil.ReadFile(path) utils.HandleError(err) return string(b) }, "literal": literal, "suffix": suffix, "prefix": prefix, "contains": contains, "loop": loop, "GET": httpGet, "s3_read": s3Read, "invoke": lambdaInvoke, "kms_encrypt": kmsEncrypt, "kms_decrypt": kmsDecrypt, "mod": func(a int, b int) int { log.Debug("Calling Template Function [mod] with arguments: %s % %s", a, b) return a % b }, "seq": func(from, to int) []int { log.Debug("Calling Template Function [seq] with arguments: %s % %s", from, to) seq := make([]int, to-from+1) for i := range seq { seq[i] = from + i } return seq }, "title": func(s string) string { log.Debug("Calling Template Function [title] with arguments: %s", s) return strings.Title(s) }, } // deploytime function maps DeployTimeFunctions = template.FuncMap{ "suffix": suffix, "prefix": prefix, "contains": contains, "loop": loop, "literal": literal, "GET": httpGet, "s3_read": s3Read, "invoke": lambdaInvoke, "kms_encrypt": kmsEncrypt, "kms_decrypt": kmsDecrypt, } )
Common Functions - Both Deploy/Gen
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.