Liking cljdoc? Tell your friends :D

lambdaisland.witchcraft.config

Create and handle Glowstone ServerConfig instances

Generally to configure Glowstone you edit YAML files, but that's not very Clojure-y. This config munging below allows you to define config values as inline EDN. The values in the config map that you provide to data-config or server-config are keywords derived from the ServerConfig$Key enum, see (keys config-keys)

Create and handle Glowstone ServerConfig instances

Generally to configure Glowstone you edit YAML files, but that's not very
Clojure-y. This config munging below allows you to define config values as
inline EDN. The values in the config map that you provide to [[data-config]]
or [[server-config]] are keywords derived from the `ServerConfig$Key` enum,
see `(keys config-keys)`
raw docstring

config-keysclj

Mapping from Clojure keyword to ServerConfig$Key enum entry.

Mapping from Clojure keyword to `ServerConfig$Key` enum entry.
sourceraw docstring

config-paramsclj

(config-params opts)

Convert a map using Clojure keywords to use ServerConfig$Key keys, the way ServerConfig expects.

Convert a map using Clojure keywords to use `ServerConfig$Key` keys, the way
`ServerConfig` expects.
sourceraw docstring

data-configclj

(data-config opts)

Creates an in-memory config based on the passed in data.

Makes sure all defaults are explicitly present in the map passed to ServerConfig, and overrides load/save to be no-ops.

Creates an in-memory config based on the passed in data.

Makes sure all defaults are explicitly present in the map passed to
ServerConfig, and overrides load/save to be no-ops.
sourceraw docstring

default-paramsclj

source

key-dataclj

All data encoded in the ServerConfig$Key enum as plain data.

All data encoded in the `ServerConfig$Key` enum as plain data.
sourceraw docstring

server-configclj

(server-config {:keys [config-dir config-file]
                :or {config-dir "config" config-file "glowstone.yml"}
                :as config})

Create a ServerConfig backed by a YAML file, takes the :config-dir and :config-file (YAML), and optionally other config keys. Defaults to config/glowstone.yml

Create a ServerConfig backed by a YAML file, takes the `:config-dir` and
`:config-file` (YAML), and optionally other config keys. Defaults to
`config/glowstone.yml`
sourceraw docstring

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

× close