Liking cljdoc? Tell your friends :D

crispin.core

Managing system-wide configuration.

Configuration map is assumed immutable and can be safely cached. Configuration is static. When the config changes, service should be restarted. Design choice is to have stateless fail-fast services, that have their configuration stored on various places.

Managing system-wide configuration.

Configuration map is assumed immutable and can be safely cached.
Configuration is static. When the config changes, service should be
restarted. Design choice is to have stateless fail-fast services,
that have their configuration stored on various places.
raw docstring

bgetclj

(bget cfg k)
(bget cfg k default)

Like get, but coerces to boolean. Does not parse default value. Defaults to false

Like get, but coerces to boolean. Does not parse default value.
Defaults to false
sourceraw docstring

bget-inclj

(bget-in cfg ks)
(bget-in cfg ks default-value)

Like get-in, but coerces to boolean. Does not parse default value. Defaults to false.

Like get-in, but coerces to boolean. Does not parse default value.
Defaults to false.
sourceraw docstring

bmapclj

source

cfgclj

(cfg)
(cfg search-in)
(cfg search-in include-raw?)

Provides map merged from various sources, in following order:

  • :cp Configuration file in the root classpath
  • :profile Project specific environment variables (set e.g. in lein project.clj or profiles.clj) Users must use lein-environ plugin to enable this
  • custom-cfg reference
  • :env Environment variables, translating keys
  • :sys Java system properties, translating keys
  • :res Custom configuration resources pointed from [:crispin] property, guessing format from filename, defaulting to .edn

Sources are also optionally put under :raw key.

Accepted file names for configuration files, loaded in following order:

  • config.json
  • config.edn
  • config.clj

Conflicts when merging branch and non-branch nodes are resolved into creation of branch node with previous non-branch node put under nil key.

Provides map merged from various sources, in following order:

* :cp Configuration file in the root classpath
* :profile Project specific environment variables
  (set e.g. in lein project.clj or profiles.clj)
  Users must use lein-environ plugin to enable this
* custom-cfg reference
* :env Environment variables, translating keys
* :sys Java system properties, translating keys
* :res Custom configuration resources pointed from [:crispin]
  property, guessing format from filename, defaulting to .edn

Sources are also optionally put under :raw key.

Accepted file names for configuration files, loaded in following
order:
* config.json
* config.edn
* config.clj

Conflicts when merging branch and non-branch nodes are resolved
into creation of branch node with previous non-branch node put
under nil key.
sourceraw docstring

custom-cfgclj

A reference to map that will be merged into configuration map. Used e.g. by boot to inject custom configuration.

A reference to map that will be merged into configuration
map. Used e.g. by boot to inject custom configuration.
sourceraw docstring

escape-mapclj

source

fetch-cp-entryclj

(fetch-cp-entry entry ppath)
source

fetch-envclj

(fetch-env)

Returns map that represents current environment variables. Name of the environment variable is translated into sequence of keys, e.g. JAVA_HOME will result into {:java {:home "/usr/lib/..."}} map

Returns map that represents current environment variables.
Name of the environment variable is translated into sequence
of keys, e.g. JAVA_HOME will result into
{:java {:home "/usr/lib/..."}} map
sourceraw docstring

fetch-resourceclj

(fetch-resource uri)
(fetch-resource parser uri)

Returns map loaded from resource specified by _uri_, parsed with _parser_. UTF-8 encoding is assumed and the resource must produce exactly one parsed value. Returns nil if resource does not exists

Returns map loaded from resource specified by `_uri_`, parsed with
`_parser_`. UTF-8 encoding is assumed and the resource must
produce exactly one parsed value.
Returns `nil` if resource does not exists
sourceraw docstring

fetch-rootclj

(fetch-root)
source

fetch-sysclj

(fetch-sys)

Returns map that represents current system properties Name of the environment variable is translated into sequence of keys, e.g. java.home will result into {:java {:home "/usr/lib/..."}} map

Returns map that represents current system properties
Name of the environment variable is translated into sequence
of keys, e.g. java.home will result into
{:java {:home "/usr/lib/..."}} map
sourceraw docstring

filenames-in-jarclj

(filenames-in-jar jar-file)

Returns a sequence of Strings naming the non-directory entries in the _jar-file_.

Returns a sequence of Strings naming the non-directory entries in
the `_jar-file_`.
sourceraw docstring

instance?*clj

(instance?* t m)
source

IResourcecljprotocol

-get-uriclj

(-get-uri this)
source

jar-file?clj

(jar-file? f)

Returns _true_ if file is a normal file with a .jar or .JAR extension.

Returns `_true_` if file is a normal file with a .jar or
.JAR extension.
sourceraw docstring

merge-cfgclj

(merge-cfg & maps)
source

ngetclj

(nget cfg k)
(nget cfg k default)

Like get, but coerces to number. Does not parse default value. Allows nil values.

Like get, but coerces to number. Does not parse default value.
Allows nil values.
sourceraw docstring

nget-inclj

(nget-in cfg ks)
(nget-in cfg ks default-value)

Like get-in, but parses value with edn reader and asserts that it is a number. Does not parse default value. Allows nil values.

Like get-in, but parses value with edn reader and asserts that
it is a number. Does not parse default value. Allows nil values.
sourceraw docstring

preescape-mapclj

source

provide-sequentialclj

(provide-sequential x)
source

sgetclj

(sget cfg k)
(sget cfg k default)

Like get, but coerces to string. Does not parse default value. Allows nil values.

Like get, but coerces to string. Does not parse default value.
Allows nil values.
sourceraw docstring

sget-inclj

(sget-in cfg ks)
(sget-in cfg ks default-value)

Like get-in, but coerces to string. Does not parse default value. Nil is not coerced into a string.

Like get-in, but coerces to string. Does not parse default value.
Nil is not coerced into a string.
sourceraw docstring

transform-keysclj

(transform-keys coll separator)
source

unescapeclj

(unescape s m)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close