Skip to content

Commit

Permalink
docs: List release versions for each function, add unreleased label
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Henderson <[email protected]>
  • Loading branch information
hairyhenderson committed Oct 20, 2023
1 parent d4d0df9 commit fd05eb3
Show file tree
Hide file tree
Showing 45 changed files with 892 additions and 398 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ report.xml
*.iid
*.out
.netlify
docs/.hugo_build.lock
9 changes: 9 additions & 0 deletions docs-src/content/functions/aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ preamble: |
funcs:
- name: aws.EC2Meta
alias: ec2meta
released: v1.8.0
description: |
Queries AWS [EC2 Instance Metadata](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) for information. This only retrieves data in the `meta-data` path -- for data in the `dynamic` path use `aws.EC2Dynamic`.
Expand All @@ -38,6 +39,7 @@ funcs:
i-12345678
- name: aws.EC2Dynamic
alias: ec2dynamic
released: v1.8.0
description: |
Queries AWS [EC2 Instance Dynamic Metadata](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) for information. This only retrieves data in the `dynamic` path -- for data in the `meta-data` path use `aws.EC2Meta`.
Expand All @@ -56,6 +58,7 @@ funcs:
us-east-1
- name: aws.EC2Region
alias: ec2region
released: v1.8.0
description: |
Queries AWS to get the region. An optional default can be provided, or returns
`unknown` if it can't be determined for some reason.
Expand All @@ -80,6 +83,7 @@ funcs:
```
- name: aws.EC2Tag
alias: ec2tag
released: v3.8.0
description: |
Queries the AWS EC2 API to find the value of the given [user-defined tag](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html). An optional default
can be provided.
Expand All @@ -100,6 +104,7 @@ funcs:
I am a meat popsicle.
- name: aws.EC2Tags
alias: ec2tags
released: v3.8.0
description: |
Queries the AWS EC2 API to find all the tags/values [user-defined tag](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html).
pipeline: false
Expand Down Expand Up @@ -145,6 +150,7 @@ funcs:
$ export CIPHER=$(gomplate -i '{{ aws.KMSEncrypt "alias/gomplate" "hello world" }}')
$ gomplate -i '{{ env.Getenv "CIPHER" | aws.KMSDecrypt }}'
- name: aws.KMSDecrypt
released: v3.4.0
description: |
Decrypt ciphertext that was encrypted with the AWS Key Management Service
(KMS).
Expand All @@ -165,6 +171,7 @@ funcs:
$ export CIPHER=$(gomplate -i '{{ aws.KMSEncrypt "alias/gomplate" "hello world" }}')
$ gomplate -i '{{ env.Getenv "CIPHER" | aws.KMSDecrypt }}'
- name: aws.Account
released: v3.4.0
description: |
Returns the currently-authenticated AWS account ID number.
Expand All @@ -177,6 +184,7 @@ funcs:
$ gomplate -i 'My account is {{ aws.Account }}'
My account is 123456789012
- name: aws.ARN
released: v3.4.0
description: |
Returns the AWS ARN (Amazon Resource Name) associated with the current authentication credentials.
Expand All @@ -189,6 +197,7 @@ funcs:
$ gomplate -i 'Calling from {{ aws.ARN }}'
Calling from arn:aws:iam::123456789012:user/Alice
- name: aws.UserID
released: v3.4.0
description: |
Returns the unique identifier of the calling entity. The exact value
depends on the type of entity making the call. The values returned are those
Expand Down
3 changes: 3 additions & 0 deletions docs-src/content/functions/base64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ ns: base64
preamble: ''
funcs:
- name: base64.Encode
released: v1.8.0
description: |
Encode data as a Base64 string. Specifically, this uses the standard Base64 encoding as defined in [RFC4648 &sect;4](https://tools.ietf.org/html/rfc4648#section-4) (and _not_ the URL-safe encoding).
pipeline: true
Expand All @@ -17,6 +18,7 @@ funcs:
$ gomplate -i '{{ "hello world" | base64.Encode }}'
aGVsbG8gd29ybGQ=
- name: base64.Decode
released: v1.8.0
description: |
Decode a Base64 string. This supports both standard ([RFC4648 &sect;4](https://tools.ietf.org/html/rfc4648#section-4)) and URL-safe ([RFC4648 &sect;5](https://tools.ietf.org/html/rfc4648#section-5)) encodings.
Expand All @@ -36,6 +38,7 @@ funcs:
$ gomplate -i '{{ "aGVsbG8gd29ybGQ=" | base64.Decode }}'
hello world
- name: base64.DecodeBytes
released: v3.8.0
description: |
Decode a Base64 string. This supports both standard ([RFC4648 &sect;4](https://tools.ietf.org/html/rfc4648#section-4)) and URL-safe ([RFC4648 &sect;5](https://tools.ietf.org/html/rfc4648#section-5)) encodings.
Expand Down
18 changes: 18 additions & 0 deletions docs-src/content/functions/coll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ preamble: |
input was a different type.
funcs:
- name: coll.Dict
released: v3.2.0
alias: dict
description: |
Dict is a convenience function that creates a map with string keys.
Expand Down Expand Up @@ -43,6 +44,7 @@ funcs:
Hello world!
Hello everybody!
- name: coll.Slice
released: v3.2.0
deprecated: The `slice` alias is deprecated, use the full name `coll.Slice` instead.
alias: slice
description: |
Expand All @@ -59,6 +61,7 @@ funcs:
Hello, Lisa
Hello, Maggie
- name: coll.GoSlice
# released: v4.0.0
description: |
This exposes the `slice` function from Go's [`text/template`](https://golang.org/pkg/text/template/#hdr-Functions)
package. Note that using `slice` will use the `coll.Slice` function instead,
Expand Down Expand Up @@ -89,6 +92,7 @@ funcs:
$ gomplate -i '{{ coll.GoSlice "hello world" 3 8 }}'
lo wo
- name: coll.Has
released: v3.2.0
alias: has
description: |
Reports whether a given object has a property with the given key, or whether a given array/slice contains the given value. Can be used with `if` to prevent the template from trying to access a non-existent property in an object.
Expand All @@ -115,6 +119,7 @@ funcs:
{{ if (has $o "foo") }}{{ $o.foo }}{{ else }}THERE IS NO FOO{{ end }}'
THERE IS NO FOO
- name: coll.Index
# released: v4.0.0
description: |
Returns the result of indexing the given map, slice, or array by the given
key or index. This is similar to the built-in `index` function, but the
Expand Down Expand Up @@ -144,6 +149,7 @@ funcs:
bar
- name: coll.JSONPath
alias: jsonpath
released: v3.4.0
description: |
Extracts portions of an input object or list using a [JSONPath][] expression.
Expand All @@ -166,6 +172,7 @@ funcs:
[Alice's Adventures in Wonderland Gulliver's Travels]
- name: coll.JQ
alias: jq
# released: v4.0.0
description: |
Filters an input object or list using the [jq](https://stedolan.github.io/jq/) language, as implemented by [gojq](https://github.com/itchyny/gojq).
Expand Down Expand Up @@ -194,6 +201,7 @@ funcs:
-c books=https://openlibrary.org/subjects/fantasy.json
map[authors:[Lewis Carroll] published:1865 title:Alice's Adventures in Wonderland]
- name: coll.Keys
released: v3.2.0
alias: keys
description: |
Return a list of keys in one or more maps.
Expand All @@ -215,6 +223,7 @@ funcs:
[bar foo baz qux]
- name: coll.Values
alias: values
released: v3.2.0
description: |
Return a list of values in one or more maps.
Expand All @@ -235,6 +244,7 @@ funcs:
[2 1 3 4]
- name: coll.Append
alias: append
released: v3.2.0
description: |
Append a value to the end of a list.
Expand All @@ -255,6 +265,7 @@ funcs:
[1 1 2 3 5]
- name: coll.Prepend
alias: prepend
released: v3.2.0
description: |
Prepend a value to the beginning of a list.
Expand All @@ -275,6 +286,7 @@ funcs:
[5 4 3 2 1]
- name: coll.Uniq
alias: uniq
released: v3.2.0
description: |
Remove any duplicate values from the list, without changing order.
Expand All @@ -290,6 +302,7 @@ funcs:
[1 2 3 4 5]
- name: coll.Flatten
alias: flatten
released: v3.6.0
description: |
Flatten a nested list. Defaults to completely flattening all nested lists,
but can be limited with `depth`.
Expand All @@ -312,6 +325,7 @@ funcs:
[1 2 3 4 [[5] 6] 7]
- name: coll.Reverse
alias: reverse
released: v3.2.0
description: |
Reverse a list.
Expand All @@ -327,6 +341,7 @@ funcs:
[1 2 3 4]
- name: coll.Sort
alias: sort
released: v3.2.0
description: |
Sort a given list. Uses the natural sort order if possible. For inputs
that are not sortable (either because the elements are of different types,
Expand Down Expand Up @@ -360,6 +375,7 @@ funcs:
bar
- name: coll.Merge
alias: merge
released: v3.2.0
description: |
Merge maps together by overriding src with dst.
Expand Down Expand Up @@ -390,6 +406,7 @@ funcs:
{{ coll.Merge $dst $src1 $src2 }}'
map[foo:1 bar:5 baz:4]
- name: coll.Pick
released: v3.7.0
description: |
Given a map, returns a new map with any entries that have the given keys.
Expand All @@ -412,6 +429,7 @@ funcs:
{{ coll.Pick "foo" "baz" $data }}'
map[baz:3 foo:1]
- name: coll.Omit
released: v3.7.0
description: |
Given a map, returns a new map without any entries that have the given keys.
Expand Down
Loading

0 comments on commit fd05eb3

Please sign in to comment.