-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add 1Password SDK template funcs
- Loading branch information
Showing
9 changed files
with
283 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
assets/chezmoi.io/docs/reference/templates/1password-sdk-functions/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# 1Password SDK functions | ||
|
||
!!! warning | ||
|
||
1Password SDK template functions are experimental and may change. | ||
|
||
The `onepasswordSDK*` template functions return structured data from | ||
[1Password](https://1password.com/) using the [1Password | ||
SDK](https://developer.1password.com/docs/sdks/). | ||
|
||
By default, the 1Password service account token is taken from the | ||
`$OP_SERVICE_ACCOUNT_TOKEN` environment variable. The name of the environment | ||
variable can be set with `onepasswordSDK.tokenEnvVar` configuration variable, or | ||
the token can be set explicitly by setting the `onepasswordSDK.token` | ||
configuration variable. |
17 changes: 17 additions & 0 deletions
17
...i.io/docs/reference/templates/1password-sdk-functions/onepasswordSDKItemsGet.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# `onepasswordSDKItemsGet` *vault-id* *item-id* | ||
|
||
!!! warning | ||
|
||
`onepasswordSDKItemsGet` is an experimental function and may change. | ||
|
||
`onepasswordSDKItemsGet` returns an item from [1Password](https://1password.com) | ||
using the [1Password SDK](https://developer.1password.com/docs/sdks/). | ||
|
||
The output of `onepasswordSDKItemsGet` is cached so multiple calls to | ||
`onepasswordSDKItemsGet` with the same *vault-id* and *item-id* will return the same value. | ||
|
||
!!! example | ||
|
||
``` | ||
{{- onepasswordSDKItemsGet "vault" "item" | toJson -}} | ||
``` |
17 changes: 17 additions & 0 deletions
17
...ocs/reference/templates/1password-sdk-functions/onepasswordSDKSecretsResolve.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# `onepasswordSDKSecretsResolve` *url* | ||
|
||
!!! warning | ||
|
||
`onepasswordSDKSecretsResolve` is an experimental function and may change. | ||
|
||
`onepasswordSDKSecretsResolve` returns a secret from [1Password](https://1password.com) | ||
using the [1Password SDK](https://developer.1password.com/docs/sdks/). | ||
|
||
The output of `onepasswordSDKSecretsResolve` is cached so multiple calls to | ||
`onepasswordSDKSecretsResolve` with the same *url* will return the same value. | ||
|
||
!!! example | ||
|
||
``` | ||
{{- onepasswordSDKSecretsResolve "op://vault/item/field" -}} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.