Whether a MountSpec is permitted to mount at all. Pure.
The mounter depends on this abstraction, never on a licence implementation: a gate is any ILicenseGate, or any (fn [spec] -> nil | reason-keyword). Returning nil permits; returning a keyword refuses and names the reason.
A spec whose :addon/trust-class is :proprietary is refused unless a gate is installed, so the default posture of an unconfigured host is closed.
Whether a MountSpec is permitted to mount at all. Pure. The mounter depends on this abstraction, never on a licence implementation: a gate is any ILicenseGate, or any (fn [spec] -> nil | reason-keyword). Returning nil permits; returning a keyword refuses and names the reason. A spec whose :addon/trust-class is :proprietary is refused unless a gate is installed, so the default posture of an unconfigured host is closed.
Refuses every gated spec. The default when no gate is installed.
Refuses every gated spec. The default when no gate is installed.
Trust classes that require a gate to mount.
Trust classes that require a gate to mount.
(gated? spec)True when spec may only mount through a licence gate.
True when `spec` may only mount through a licence gate.
(gate-id this)Keyword identifying this gate.
Keyword identifying this gate.
(permit? this spec)nil to permit, else a reason keyword.
nil to permit, else a reason keyword.
(install-gate! gate)Install gate as this host's licence gate. The DIP swap point: a host gains
real licence checking by installing data-shaped behaviour, not by editing
the mounter.
Install `gate` as this host's licence gate. The DIP swap point: a host gains real licence checking by installing data-shaped behaviour, not by editing the mounter.
(installed-gate)The currently installed gate.
The currently installed gate.
Permits everything. For development and for hosts that ship no proprietary addons; never appropriate where a proprietary artifact is present.
Permits everything. For development and for hosts that ship no proprietary addons; never appropriate where a proprietary artifact is present.
(permit gate spec)nil when spec may mount under gate, else the refusal reason.
gate is an ILicenseGate or a plain fn of the spec. A gate that throws is
a refusal, never an escape: :deny/gate-error.
nil when `spec` may mount under `gate`, else the refusal reason. `gate` is an ILicenseGate or a plain fn of the spec. A gate that throws is a refusal, never an escape: :deny/gate-error.
(reset-gate!)Restore the closed default.
Restore the closed default.
Re-exported so a MountSpec can state its trust class without reaching into the plug layer.
Re-exported so a MountSpec can state its trust class without reaching into the plug layer.
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 |