Function |format
std/secret::|format
Usage
|format(template, entries, name)
Parameters
↳ template: string
↳ entries: Map (std/data/map::Map)
↳ name: string
Return
↴ Secret<string>
Secret made of template filled with entries, computed when revealed.
template contains braced placeholders, such as "Bearer {token}".
entries maps placeholders to string or Secret<string> values, built with
std/data/map::|map and |entry. Values can also be in an option, as |locate
gives secrets: an empty option counts as no entry for its placeholder.
The secret is named name, and gets the most restrictive combination
of the policies of the secrets in entries.
Revealing fails if the template uses a placeholder with no entry, or if an entry
is neither a string nor a Secret<string>.