Logic for how to turn a config key and possibly an app prefix into various things we can look up.
Env vars:
__:service/api-key -> MY_APP__SERVICE_API_KEYFile names:
-*?<>! are stripped:service/api-key! -> my-app-service-api-keyLogic for how to turn a config key and possibly an app prefix into various things we can look up. Env vars: - uppercased - dashes and slashes become underscores - prefix is separated from key with `__` - special characters are munged see ([[clojure.core/munge]]) - e.g. prefix: "my-app", key: `:service/api-key` -> MY_APP__SERVICE_API_KEY File names: - slashes become dashes - prefix is separated from key with `-` - characters `*?<>!` are stripped - e.g. prefix: "my-app", key: `:service/api-key!` -> my-app-service-api-key
(key->env-var prefix k)Take the key used to identify a setting or secret, and turn it into a string suitable for use as an environment variable.
Take the key used to identify a setting or secret, and turn it into a string suitable for use as an environment variable. - if the key is already a string it is left untouched - otherwise it is assumed to be an ident (symbol or keyword) - identifiers are uppercased and munged, as per [[munge]] - dashes become underscores - if the ident is qualified (has a namespace), two underscores are used to separate name and namespace
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |