Skip to content

Commit

Permalink
Added Go build tag note to modules (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
applejag committed Jan 23, 2024
1 parent dcabca3 commit a1adee8
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
7 changes: 7 additions & 0 deletions modules/aws/aws.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import { Callout } from 'nextra/components';

# aws

<Callout type="info" emoji="ℹ️">
This module requires that Risor has been compiled with the `aws` Go build tag.
When compiling **manually**, [make sure you specify `-tags aws`](https://github.com/risor-io/risor#build-and-install-the-cli-from-source).
</Callout>

The `aws` module exposes a simple interface that wraps the AWS SDK v2 for Go.
Create a client by providing the name of the service you want to use. All API
calls for that service are then made available on the client.
Expand Down
7 changes: 7 additions & 0 deletions modules/kubernetes/kubernetes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import { Callout } from 'nextra/components';

# kubernetes

<Callout type="info" emoji="ℹ️">
This module requires that Risor has been compiled with the `k8s` Go build tag.
When compiling **manually**, [make sure you specify `-tags k8s`](https://github.com/risor-io/risor#build-and-install-the-cli-from-source).
</Callout>

Module `k8s` provides methods for getting, listing, deleting and updating resources using the Kubernetes API.

## Functions
Expand Down
5 changes: 4 additions & 1 deletion modules/template/template.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ render(data object, template string) string
```

Returns the rendered template as a string.
It includes all the sprig lib functions as well as some extras like a k8sLookup function to get values from k8s objects.
It includes all the sprig lib functions.
You can access environment variables from the template under .Env and the passed values will be available under .Values in the template

If compiled with [`-tags k8s`](https://github.com/risor-io/risor#build-and-install-the-cli-from-source),
it also includes a k8sLookup function to get values from k8s objects.

```go filename="Example"
>>> fetch("http://ipinfo.io").json() | render("You are in {{ .Values.city }}, region {{ .Values.region }} in {{ .Values.timezone }}")
"You are in Dublin, region Leinster in Europe/Dublin"
Expand Down
7 changes: 7 additions & 0 deletions modules/vault/vault.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import { Callout } from 'nextra/components';

# vault

<Callout type="info" emoji="ℹ️">
This module requires that Risor has been compiled with the `vault` Go build tag.
When compiling **manually**, [make sure you specify `-tags vault`](https://github.com/risor-io/risor#build-and-install-the-cli-from-source).
</Callout>

Module `vault` provides a client to interact with Hashicorp Vault

## Functions
Expand Down

0 comments on commit a1adee8

Please sign in to comment.