Documentation ¶
Overview ¶
Package secrets provides functions for retrieving local and remote secrets and interpolating them into configuration files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Interpolate ¶
Interpolate identifies when a string contains one or more secrets and interpolates each secret with the string. This function uses the same convention as the standard library's regexp package for capturing named groups (${name}).
For example, if the string is "/path/to/${SECRET:FOO}" and BAR is the secret value stored in the internal lookup, then the interpolated string is "/path/to/BAR".
Multiple secrets can be stored in a single string; if the string is "/path/to/${SECRET:FOO}/${SECRET:BAZ}", then the interpolated string is "/path/to/BAR/QUX".
If more than one interpolation function is applied to a string (e.g., non-secrets capture groups), then this function must be called first.