Liking cljdoc? Tell your friends :D

outpace.config


configclj

The delayed map of explicit configuration values.

The delayed map of explicit configuration values.
sourceraw docstring

defaultsclj

A ref containing the map of symbols for the loaded defconfig vars to their default values.

A ref containing the map of symbols for the loaded defconfig vars to their
default values.
sourceraw docstring

defconfigcljmacro

(defconfig name)
(defconfig name default-val)
(defconfig name doc default-val)

Same as (def name doc-string? init?) except the var's value may be configured at load-time by this library.

The following additional metadata is supported: :required - When true, an exception will be thrown if no default nor configured value is provided. :validate - A vector of alternating single-arity predicates and error messages. After a value is set on the var, an exception will be thrown when a predicate, passed the set value, yields false.

Note: default-val will be evaluated, even if a configured value is provided.

Same as (def name doc-string? init?) except the var's value may be configured
at load-time by this library.

The following additional metadata is supported:
  :required - When true, an exception will be thrown if no default nor
              configured value is provided.
  :validate - A vector of alternating single-arity predicates and error
              messages. After a value is set on the var, an exception will be
              thrown when a predicate, passed the set value, yields false.

Note: default-val will be evaluated, even if a configured value is provided.
sourceraw docstring

defconfig!cljmacro

(defconfig! name)

Equivalent to (defconfig ^:required ...).

Equivalent to (defconfig ^:required ...).
sourceraw docstring

EdnValclj

source

EnvValclj

source

Extractablecljprotocol

extractclj

(extract this)

Extracts the value to be bound to a config var

Extracts the value to be bound to a config var
source

FileValclj

source

generating?clj

source

load-configclj

(load-config)

Finds and loads config.

Finds and loads config.
sourceraw docstring

load-data-readersclj

(load-data-readers)

Loads the namespaces of data reader Vars whose reader tag symbol has the 'config' namespace.

Loads the namespaces of data reader Vars whose reader tag symbol has the
'config' namespace.
sourceraw docstring

lookupclj

(lookup qname)
(lookup qname default-val)

Returns the extracted value if the qname is present, otherwise default-val or nil.

Returns the extracted value if the qname is present, otherwise default-val
or nil.
sourceraw docstring

non-defaultedclj

A ref containing the set of symbols for the loaded defconfig vars that do not have a default value.

A ref containing the set of symbols for the loaded defconfig vars that do
not have a default value.
sourceraw docstring

Optionalcljprotocol

provided?clj

(provided? this)

Returns true if the item should be bound to a config var.

Returns true if the item should be bound to a config var.
source

OrValclj

source

present?clj

(present? qname)

Returns true if a configuration entry exists for the qname and, if an Optional value, the value is provided.

Returns true if a configuration entry exists for the qname and, if an
Optional value, the value is provided.
sourceraw docstring

PropValclj

source

read-configclj

(read-config source)

Reads the config EDN map from a source acceptable to clojure.java.io/reader.

Reads the config EDN map from a source acceptable to clojure.java.io/reader.
sourceraw docstring

read-ednclj

(read-edn source)

Returns an EdnVal from a string value. Can be composed with other readers.

Returns an EdnVal from a string value. Can be composed with other readers.
sourceraw docstring

read-envclj

(read-env name)

Returns an EnvVal identified by the specified string name.

Returns an EnvVal identified by the specified string name.
sourceraw docstring

read-fileclj

(read-file path)

Returns a FileVal identified by the specified string path.

Returns a FileVal identified by the specified string path.
sourceraw docstring

read-orclj

(read-or source)

Returns an OrVal from a vector.

Returns an OrVal from a vector.
sourceraw docstring

read-propertyclj

(read-property name)

Returns a PropVal identified by the specified string name.

Returns a PropVal identified by the specified string name.
sourceraw docstring

unboundclj

(unbound)

Returns the set of symbols for the defconfig vars with neither a default nor configured value.

Returns the set of symbols for the defconfig vars with neither a default nor
configured value.
sourceraw docstring

valid-key?clj

(valid-key? k)

Returns true IFF k is acceptable as a key in a configuration map, i.e., a namespaced symbol.

Returns true IFF k is acceptable as a key in a configuration map,
i.e., a namespaced symbol.
sourceraw docstring

validateclj

(validate val var-sym validate-vec)

Throws an ex-info if, for any predicate in validate-vec, (pred val) is false.

The validate-vec must be a vector of alternating single-arity predicate fns and associated error messages. Example: [number? "must be a number" even? "must be even"]

The ex-info's ex-data map will contain the following entries: :pred - the predicate fn that failed :msg - the associated error message :sym - the fully-qualified symbol of the config var :val - the value set on the config var

Throws an ex-info if, for any predicate in validate-vec, (pred val) is false.

 The validate-vec must be a vector of alternating single-arity predicate fns
 and associated error messages.
 Example: [number? "must be a number" even? "must be even"]

The ex-info's ex-data map will contain the following entries:
  :pred - the predicate fn that failed
  :msg  - the associated error message
  :sym  - the fully-qualified symbol of the config var
  :val  - the value set on the config var
sourceraw docstring

var-symbolclj

(var-symbol v)

Returns the namespace-qualified symbol for the var.

Returns the namespace-qualified symbol for the var.
sourceraw docstring

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

× close