Liking cljdoc? Tell your friends :D

dev.arkaitz.web-base.config

EDN configuration, read explicitly and passed in (SPEC §3, §6). The one reader tag the base adds, #wb/env "VAR", is how a secret such as the session key reaches the config from the environment without ever being committed. It has no default form on purpose: a default is how a development key reaches production (SPEC §11).

A development machine may name the variables in a file instead of exporting them on every start: env-file-readers. That file is asked only for what the environment does not have, it is never looked for on its own, and what comes out of it is logged.

EDN configuration, read explicitly and passed in (SPEC §3, §6). The one
reader tag the base adds, `#wb/env "VAR"`, is how a secret such as the
session key reaches the config from the environment without ever being
committed. It has no default form on purpose: a default is how a
development key reaches production (SPEC §11).

A development machine may name the variables in a file instead of exporting
them on every start: `env-file-readers`. That file is asked only for what the
environment does not have, it is never looked for on its own, and what comes
out of it is logged.
raw docstring

env-file-readersclj

(env-file-readers path)

env-readers over the EDN map in the file at path, which the operator keeps out of the repository. An absent file is not an error — it is the production case — and yields readers unchanged. The file is never looked for unless a host asks for it by name, and it is read with the plain readers, so a #wb/env inside it still means the environment.

`env-readers` over the EDN map in the file at `path`, which the operator
keeps out of the repository. An absent file is not an error — it is the
production case — and yields `readers` unchanged. The file is never looked
for unless a host asks for it by name, and it is read with the plain
`readers`, so a `#wb/env` inside it still means the environment.
sourceraw docstring

env-readersclj

(env-readers variables)
(env-readers variables source)

The base's readers, with variables — a map of variable name to value — consulted for a name the process environment does not have. The environment always wins, a name in neither still throws while the config is read, and a value taken from variables is logged at warn naming source: a development convenience has to be visible if it ever happens anywhere else.

A variable the environment holds wins even when its value is empty: an operator who exported it named it, and reading a development file instead would be the silent substitution this namespace exists to prevent.

The base's readers, with `variables` — a map of variable name to value —
consulted for a name the process environment does not have. The environment
always wins, a name in neither still throws while the config is read, and a
value taken from `variables` is logged at warn naming `source`: a
development convenience has to be visible if it ever happens anywhere else.

A variable the environment holds wins even when its value is empty: an
operator who exported it named it, and reading a development file instead
would be the silent substitution this namespace exists to prevent.
sourceraw docstring

read-fileclj

(read-file path)
(read-file readers path)

EDN from a file path.

EDN from a file path.
sourceraw docstring

read-resourceclj

(read-resource resource-name)
(read-resource readers resource-name)

EDN from a classpath resource; a missing resource is named, not a NPE from slurp on nil.

EDN from a classpath resource; a missing resource is named, not a NPE from
`slurp` on nil.
sourceraw docstring

read-stringclj

(read-string s)
(read-string readers s)

EDN from a string, with the base's readers or the ones given — the argument order of clojure.edn/read-string.

EDN from a string, with the base's readers or the ones given — the argument
order of `clojure.edn/read-string`.
sourceraw docstring

readersclj

Public so a host reading its EDN some other way — aero, ig/read-string — merges the same tags in.

Public so a host reading its EDN some other way — aero, `ig/read-string` —
merges the same tags in.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close