Configuration loading and typed accessors.
Reads resources/conf/<env>/config.edn through Aero and exposes the
settings libraries need. Assembling an Integrant system from those settings
is the application's job — see wagoe.system-config in the monorepo, or the
config.clj that wagoe new generates.
This lives in a library because four published libraries used to reach for
it with requiring-resolve, which worked in the monorepo and in generated
projects and nowhere else — and wagoe.user's CLI resolved a db-spec that
generated projects never had (BOU-306).
Usage: (def config (load-config)) (db-spec config)
Configuration loading and typed accessors. Reads `resources/conf/<env>/config.edn` through Aero and exposes the settings libraries need. Assembling an Integrant system from those settings is the application's job — see `wagoe.system-config` in the monorepo, or the `config.clj` that `wagoe new` generates. This lives in a library because four published libraries used to reach for it with `requiring-resolve`, which worked in the monorepo and in generated projects and nowhere else — and `wagoe.user`'s CLI resolved a `db-spec` that generated projects never had (BOU-306). Usage: (def config (load-config)) (db-spec config)
The #secret Aero reader and the sources it resolves through.
#secret "DB_PASSWORD" ; the default source, :env unless configured #secret [:file "db-password"] ; a named source #secret {:name "DB_PASSWORD" :default "dev"} ; a default, for dev
A source is anything implementing ISecretSource. :env and :file are
built in; declare more under :secret-sources in the config file, or pass
them to wagoe.config/load-config. A secret no source has fails the read,
naming the secret and never a value.
The `#secret` Aero reader and the sources it resolves through.
#secret "DB_PASSWORD" ; the default source, :env unless configured
#secret [:file "db-password"] ; a named source
#secret {:name "DB_PASSWORD" :default "dev"} ; a default, for dev
A source is anything implementing `ISecretSource`. `:env` and `:file` are
built in; declare more under `:secret-sources` in the config file, or pass
them to `wagoe.config/load-config`. A secret no source has fails the read,
naming the secret and never a value.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 |