Defdo.ConfigHelper
(defdo_ddns v0.5.0)
Copy Markdown
Runtime-safe configuration parsing helpers.
This module is intentionally compiled under lib/ because config/runtime.exs
depends on it at release boot time. Keeping it compiled avoids release crashes
caused by missing ad-hoc .exs helper files.
Summary
Functions
Parse JSON domain mappings.
Resolve domain mappings from JSON-first config with legacy fallback.
Resolve domain mappings from JSON input only.
Functions
Parse JSON domain mappings.
Supported formats:
Object map:
{"example.com":["www","api"],"zone.net":[]}Array entries:
[{"domain":"example.com","subdomains":["www","api"]}](subdomainsmay also be namedhostsorrecords)
Resolve domain mappings from JSON-first config with legacy fallback.
Priority:
a_records_json(CLOUDFLARE_A_RECORDS_JSON)legacy_mappings(CLOUDFLARE_DOMAIN_MAPPINGS)
Resolve domain mappings from JSON input only.
Useful for record-specific mapping vars (for example AAAA records) where we do not want legacy string fallback semantics.