User config to validated Settings. No IO: the environment is passed in.
Config arrives flattened from the manifest's :addon/config and the host's
runtime config. A feed may be written as a bare URL or as
{:feed/url .. :feed/id .. :feed/tags [..]}; keys may be keywords or the
strings a JSON config carries ("rss/feeds", "url", "id").
User config to validated Settings. No IO: the environment is passed in.
Config arrives flattened from the manifest's `:addon/config` and the host's
runtime config. A feed may be written as a bare URL or as
`{:feed/url .. :feed/id .. :feed/tags [..]}`; keys may be keywords or the
strings a JSON config carries ("rss/feeds", "url", "id").(default-state-file {:strs [XDG_STATE_HOME HOME]})Where feed state lives: $XDG_STATE_HOME/hive-rss/state.edn, else under
~/.local/state.
Where feed state lives: `$XDG_STATE_HOME/hive-rss/state.edn`, else under `~/.local/state`.
(settings config env)Result of the Settings for config under environment env (a string map).
Unknown keys are ignored; a feed listed twice by id keeps its first entry.
Error :rss/invalid-config carries the humanized problems, and for a feed
whose :feed/auth cannot be resolved, the reason by feed id.
Result of the Settings for `config` under environment `env` (a string map). Unknown keys are ignored; a feed listed twice by id keeps its first entry. Error `:rss/invalid-config` carries the humanized problems, and for a feed whose `:feed/auth` cannot be resolved, the reason by feed id.
(slug url)A feed id from its URL: host and path, lowercased, runs of anything else as one hyphen.
A feed id from its URL: host and path, lowercased, runs of anything else as one hyphen.
(subscription feed)(subscription feed env)A Subscription from a URL string or a feed map, or nil when it has no URL.
Credentials come from the map's :feed/auth (resolved against env) or
from user:secret@ in the URL, which is removed from the URL either way.
A :feed/auth that cannot be resolved leaves ::auth-problem on the
subscription for settings to refuse; it names the problem, not the key.
A Subscription from a URL string or a feed map, or nil when it has no URL. Credentials come from the map's `:feed/auth` (resolved against `env`) or from `user:secret@` in the URL, which is removed from the URL either way. A `:feed/auth` that cannot be resolved leaves `::auth-problem` on the subscription for `settings` to refuse; it names the problem, not the key.
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 |