From 40ee37ebfaab9ee4b3c2917b9313f00e608bbd55 Mon Sep 17 00:00:00 2001 From: Luke Kysow <1034429+lkysow@users.noreply.github.com> Date: Mon, 25 Mar 2024 11:13:08 -0700 Subject: [PATCH] Regen TOC --- docs/templating-language.md | 215 +++++++++++++++++++----------------- 1 file changed, 116 insertions(+), 99 deletions(-) diff --git a/docs/templating-language.md b/docs/templating-language.md index 91c90318f..36e7afc98 100644 --- a/docs/templating-language.md +++ b/docs/templating-language.md @@ -5,111 +5,127 @@ format. If you are not familiar with the syntax, please read Go's documentation and examples. In addition to the Go-provided template functions, Consul Template provides the following functions: +[comment]: <> (Generated from https://derlin.github.io/bitdowntoc/) - [API Functions](#api-functions) - - [caLeaf](#caleaf) - - [caRoots](#caroots) - - [connect](#connect) - - [datacenters](#datacenters) - - [file](#file) - - [key](#key) - - [keyExists](#keyexists) - - [keyOrDefault](#keyordefault) - - [ls](#ls) - - [safeLs](#safels) - - [node](#node) - - [nodes](#nodes) - - [secret](#secret) - - [secrets](#secrets) - - [pkiCert](#pkicert) - - [service](#service) - - [services](#services) - - [tree](#tree) - - [safeTree](#safetree) + * [`caLeaf`](#caleaf) + * [`caRoots`](#caroots) + * [`connect`](#connect) + * [`datacenters`](#datacenters) + * [`file`](#file) + * [`key`](#key) + * [`keyExists`](#keyexists) + * [`keyOrDefault`](#keyordefault) + * [`ls`](#ls) + * [`safeLs`](#safels) + * [`node`](#node) + * [`nodes`](#nodes) + * [`peerings`](#peerings) + * [`secret`](#secret) + + [Format](#format) + + [Simple Read](#simple-read) + + [Versioned Read](#versioned-read) + + [Write (and Read back)](#write-and-read-back) + * [`secrets`](#secrets) + * [`pkiCert`](#pkicert) + * [`service`](#service) + * [`services`](#services) + * [`tree`](#tree) + * [`safeTree`](#safetree) - [Scratch](#scratch) - - [scratch.Key](#scratchkey) - - [scratch.Get](#scratchget) - - [scratch.Set](#scratchset) - - [scratch.SetX](#scratchsetx) - - [scratch.MapSet](#scratchmapset) - - [scratch.MapSetX](#scratchmapsetx) - - [scratch.MapValues](#scratchmapvalues) + * [`scratch.Key`](#scratchkey) + * [`scratch.Get`](#scratchget) + * [`scratch.Set`](#scratchset) + * [`scratch.SetX`](#scratchsetx) + * [`scratch.MapSet`](#scratchmapset) + * [`scratch.MapSetX`](#scratchmapsetx) + * [`scratch.MapValues`](#scratchmapvalues) - [Helper Functions](#helper-functions) - - [base64Decode](#base64decode) - - [base64Encode](#base64encode) - - [base64URLDecode](#base64urldecode) - - [base64URLEncode](#base64urlencode) - - [byKey](#bykey) - - [byTag](#bytag) - - [byMeta](#bymeta) - - [contains](#contains) - - [containsAll](#containsall) - - [containsAny](#containsany) - - [containsNone](#containsnone) - - [containsNotAll](#containsnotall) - - [env](#env) - - [mustEnv](#mustEnv) - - [envOrDefault](#envOrDefault) - - [executeTemplate](#executetemplate) - - [explode](#explode) - - [explodeMap](#explodemap) - - [indent](#indent) - - [in](#in) - - [loop](#loop) - - [join](#join) - - [mergeMap](#mergemap) - - [mergeMapWithOverride](#mergemapwithoverride) - - [trimSpace](#trimspace) - - [trim](#trim) - - [trimPrefix](#trimprefix) - - [trimSuffix](#trimsuffix) - - [parseBool](#parsebool) - - [parseFloat](#parsefloat) - - [parseInt](#parseint) - - [parseJSON](#parsejson) - - [parseUint](#parseuint) - - [parseYAML](#parseyaml) - - [plugin](#plugin) - - [regexMatch](#regexmatch) - - [regexReplaceAll](#regexreplaceall) - - [replaceAll](#replaceall) - - [sha256Hex](#sha256hex) - - [md5sum](#md5sum) - - [hmacSHA256Hex](#hmacSHA256hex) - - [split](#split) - - [splitToMap](#splitToMap) - - [timestamp](#timestamp) - - [toJSON](#tojson) - - [toJSONPretty](#tojsonpretty) - - [toUnescapedJSON](#tounescapedjson) - - [toUnescapedJSONPretty](#tounescapedjsonpretty) - - [toLower](#tolower) - - [toTitle](#totitle) - - [toTOML](#totoml) - - [toUpper](#toupper) - - [toYAML](#toyaml) - - [sockaddr](#sockaddr) - - [writeToFile](#writeToFile) + * [`base64Decode`](#base64decode) + * [`base64Encode`](#base64encode) + * [`base64URLDecode`](#base64urldecode) + * [`base64URLEncode`](#base64urlencode) + * [`byKey`](#bykey) + * [`byTag`](#bytag) + * [`byMeta`](#bymeta) + * [`contains`](#contains) + * [`containsAll`](#containsall) + * [`containsAny`](#containsany) + * [`containsNone`](#containsnone) + * [`containsNotAll`](#containsnotall) + * [`env`](#env) + * [`mustEnv`](#mustenv) + * [`envOrDefault`](#envordefault) + * [`executeTemplate`](#executetemplate) + * [`explode`](#explode) + * [`explodeMap`](#explodemap) + * [`indent`](#indent) + * [`in`](#in) + * [`loop`](#loop) + * [`join`](#join) + * [`mergeMap`](#mergemap) + * [`mergeMapWithOverride`](#mergemapwithoverride) + * [`trimSpace`](#trimspace) + * [`trim`](#trim) + * [`trimPrefix`](#trimprefix) + * [`trimSuffix`](#trimsuffix) + * [`parseBool`](#parsebool) + * [`parseFloat`](#parsefloat) + * [`parseInt`](#parseint) + * [`parseJSON`](#parsejson) + * [`parseUint`](#parseuint) + * [`parseYAML`](#parseyaml) + * [`plugin`](#plugin) + * [`regexMatch`](#regexmatch) + * [`regexReplaceAll`](#regexreplaceall) + * [`replaceAll`](#replaceall) + * [`sha256Hex`](#sha256hex) + * [`md5sum`](#md5sum) + * [`hmacSHA256Hex`](#hmacsha256hex) + * [`split`](#split) + * [`splitToMap`](#splittomap) + * [`timestamp`](#timestamp) + * [`toJSON`](#tojson) + * [`toJSONPretty`](#tojsonpretty) + - [`toUnescapedJSON`](#tounescapedjson) + - [`toUnescapedJSONPretty`](#tounescapedjsonpretty) + * [`toLower`](#tolower) + * [`toTitle`](#totitle) + * [`toTOML`](#totoml) + * [`toUpper`](#toupper) + * [`toYAML`](#toyaml) + * [`sockaddr`](#sockaddr) + * [`writeToFile`](#writetofile) - [Sprig Functions](#sprig-functions) - [Math Functions](#math-functions) - - [add](#add) - - [subtract](#subtract) - - [multiply](#multiply) - - [divide](#divide) - - [modulo](#modulo) - - [minimum](#minimum) - - [maximum](#maximum) + * [`add`](#add) + * [`subtract`](#subtract) + * [`multiply`](#multiply) + * [`divide`](#divide) + * [`modulo`](#modulo) + * [`minimum`](#minimum) + * [`maximum`](#maximum) - [Nomad Functions](#nomad-functions) - - [nomadServices](#nomadservices) - - [nomadService](#nomadservice) - - [nomadVarList](#nomadvarlist) - - [nomadVarListSafe](#nomadvarlistsafe) - - [nomadVar](#nomadvar) - - [nomadVarExists](#nomadvarexists) -- [Debugging Functions](#debugging) - - [spew_dump](#spew_dump) - - [spew_sdump](#spew_sdump) - - [spew_printf](#spew_printf) - - [spew_sprintf](#spew_sdump) + * [`nomadServices`](#nomadservices) + * [`nomadService`](#nomadservice) +- [Nomad Variables](#nomad-variables) + * [`nomadVarList`](#nomadvarlist) + * [`nomadVarListSafe`](#nomadvarlistsafe) + + [The `NomadVarMeta` Type](#the-nomadvarmeta-type) + * [`nomadVar`](#nomadvar) + + [The `NomadVarItems` Type](#the-nomadvaritems-type) + + [The `NomadVarItem` Type](#the-nomadvaritem-type) + * [`nomadVarExists`](#nomadvarexists) +- [Debugging Functions](#debugging-functions) + * [`spew_dump`](#spew_dump) + * [`spew_sdump`](#spew_sdump) + * [`spew_printf`](#spew_printf) + + [using `%v`](#using-v) + + [using `%+v`](#using-v-1) + + [using `%+v`](#using-v-2) + + [using `%#v`](#using-v-3) + + [using `%+#v`](#using-v-4) + + [using `%#v`](#using-v-5) + * [`spew_sprintf`](#spew_sprintf) ## API Functions @@ -2266,3 +2282,4 @@ If you would prefer to use format strings with a compacted inline printing style [text-template]: https://golang.org/pkg/text/template/ "Go's text/template package" [vault]: https://www.vaultproject.io "Vault by HashiCorp" [nomad]: https://www.nomadproject.io "Nomad by HashiCorp" +