* feat(tmpl): added fetchSecretValue template function
This adds a tmpl `fetchSecretValue` and `expandSecretRefs` function by:
- Adding:
- `expandSecretRefs` function in tmpl package that uses vals
package to fetch secrets
- `fetchSecretValue` function in tmpl package like below but for
single string value
- gomock for tests purpose
- Changing:
- move init of vals package to function (so the same instance can be used for template values and rendering the whole template)
* doc(secret): added doc how to use new tmpl methods
Added example usage of `fetchSecretValue` and `expandSecretRefs`
|
||
|---|---|---|
| .. | ||
| context.go | ||
| context_funcs.go | ||
| context_funcs_test.go | ||
| context_tmpl.go | ||
| context_tmpl_test.go | ||
| expand_secret_ref.go | ||
| expand_secret_ref_test.go | ||
| expand_secrets_mock.go | ||
| file_renderer.go | ||
| file_renderer_test.go | ||
| get_or_nil.go | ||
| get_or_nil_test.go | ||
| text_renderer.go | ||