Extension-point vocabulary: what an addon ACCEPTS providers for.
A manifest carries three capability edges. :addon/capabilities is what an
addon OFFERS, :addon/requires-capabilities what it needs a HOST to offer,
and :addon/extension-points what it accepts PROVIDERS for. This namespace
owns the third and the derivations over it.
Contract: PURE. Value objects are uncompiled malli DATA (house idiom: PascalCase defs) seeded into a LOCAL composite registry that COMPOSES hive-addon.schema's registry under :extension/* keys. The registry is NEVER installed as the malli global default. Derivations take manifest maps and return data, with no registry mutation, no IO and no live fns.
Extension-point vocabulary: what an addon ACCEPTS providers for. A manifest carries three capability edges. `:addon/capabilities` is what an addon OFFERS, `:addon/requires-capabilities` what it needs a HOST to offer, and `:addon/extension-points` what it accepts PROVIDERS for. This namespace owns the third and the derivations over it. Contract: PURE. Value objects are uncompiled malli DATA (house idiom: PascalCase defs) seeded into a LOCAL composite registry that COMPOSES hive-addon.schema's registry under :extension/* keys. The registry is NEVER installed as the malli global default. Derivations take manifest maps and return data, with no registry mutation, no IO and no live fns.
(->cardinality kw__6148__auto__)Coerce a keyword to a Cardinality variant (no data fields). Returns nil if keyword is not a valid variant.
Coerce a keyword to a Cardinality variant (no data fields). Returns nil if keyword is not a valid variant.
Set of every :cardinality/* variant keyword.
Set of every :cardinality/* variant keyword.
How many providers may fill one extension point at once.
How many providers may fill one extension point at once.
(cardinality variant-kw__6145__auto__)(cardinality variant-kw__6145__auto__ data__6146__auto__)Construct a Cardinality variant. (cardinality variant-keyword) for enum variants (cardinality variant-keyword data-map) for data variants
Throws ex-info for unknown variants.
Construct a Cardinality variant. (cardinality variant-keyword) for enum variants (cardinality variant-keyword data-map) for data variants Throws ex-info for unknown variants.
(cardinality? x__6147__auto__)True if x is a Cardinality ADT value.
True if x is a Cardinality ADT value.
Enum schema over cardinalities.
Enum schema over `cardinalities`.
Malli :multi schema (dispatch :adt/variant) for Cardinality — generator-capable and EDN-safe wherever pred-sym->malli covers the declared field predicates.
Malli :multi schema (dispatch :adt/variant) for Cardinality — generator-capable and EDN-safe wherever pred-sym->malli covers the declared field predicates.
(explain ?s x)Registry-aware explain. Nil on success, error map on failure.
Registry-aware explain. Nil on success, error map on failure.
ONE seam an addon opens for providers.
:extension/capability is the join key: a provider fills this point by
declaring the same keyword in its own :addon/capabilities.
:extension/port names the protocol a provider implements and
:extension/registry the namespace it registers itself in. Both are STRINGS,
because a manifest is data and dereferences no symbol.
:extension/schema is a registry key for the parameters a provider
contributes, never the schema value itself.
:extension/docs is a classpath-relative resource inside the addon's own
artifact, so the prose travels with the version that declares it.
ONE seam an addon opens for providers. `:extension/capability` is the join key: a provider fills this point by declaring the same keyword in its own `:addon/capabilities`. `:extension/port` names the protocol a provider implements and `:extension/registry` the namespace it registers itself in. Both are STRINGS, because a manifest is data and dereferences no symbol. `:extension/schema` is a registry key for the parameters a provider contributes, never the schema value itself. `:extension/docs` is a classpath-relative resource inside the addon's own artifact, so the prose travels with the version that declares it.
The seams one addon opens, at most one per capability.
The seams one addon opens, at most one per capability.
(humanize-errors ?s x)Human-readable error data for x against ?s, or nil if x conforms.
Human-readable error data for x against ?s, or nil if x conforms.
(index spec)spec -> {capability ExtensionPoint}.
`spec` -> {capability ExtensionPoint}.
(openers specs)specs -> {capability #{addon-id}}: who ACCEPTS providers for each.
`specs` -> {capability #{addon-id}}: who ACCEPTS providers for each.
(over-subscribed specs)specs -> {addon-id {capability #{tenant-id}}}: :cardinality/one points
filled by more than one provider.
`specs` -> {addon-id {capability #{tenant-id}}}: `:cardinality/one` points
filled by more than one provider.(point-capabilities spec)spec -> the set of capabilities it accepts providers for.
`spec` -> the set of capabilities it accepts providers for.
(points-of spec)spec -> its declared ExtensionPoints, or [].
`spec` -> its declared ExtensionPoints, or [].
(providers specs)specs -> {capability #{addon-id}}: who OFFERS each capability.
`specs` -> {capability #{addon-id}}: who OFFERS each capability.
Composite malli registry: hive-addon.schema's registry plus this ns's :extension/* schemas. NOT installed as the global default.
Composite malli registry: hive-addon.schema's registry plus this ns's :extension/* schemas. NOT installed as the global default.
(report specs)specs -> {:openers :providers :vacant :unconsumed :over-subscribed}.
Everything derived, nothing stored.
`specs` -> {:openers :providers :vacant :unconsumed :over-subscribed}.
Everything derived, nothing stored.(schema ?s)Compile ?s against the local :extension/* + :addon/* registry.
Compile ?s against the local :extension/* + :addon/* registry.
(tenants specs capability)The addon ids in specs that fill capability, excluding the opener itself.
The addon ids in `specs` that fill `capability`, excluding the opener itself.
(unconsumed specs)specs -> {addon-id #{capability}}: offered, and referenced by nothing.
The mirror of vacant. A capability here is neither some addon's extension
point, nor any addon's :addon/requires-capabilities, nor standard, so
nothing in the system can reach what this addon registered.
`specs` -> {addon-id #{capability}}: offered, and referenced by nothing.
The mirror of `vacant`. A capability here is neither some addon's extension
point, nor any addon's `:addon/requires-capabilities`, nor standard, so
nothing in the system can reach what this addon registered.(vacant specs)specs -> {addon-id #{capability}}: points opened with no tenant.
The mirror of a mount plan's :unmet-capabilities. A vacant point is a seam
no provider has ever exercised end to end.
`specs` -> {addon-id #{capability}}: points opened with no tenant.
The mirror of a mount plan's `:unmet-capabilities`. A vacant point is a seam
no provider has ever exercised end to end.x -> boolean. Compiled ExtensionPoint validator.
x -> boolean. Compiled ExtensionPoint validator.
(validate ?s x)Registry-aware validate. True or false.
Registry-aware validate. True or false.
(validate* ?s x)(validate* ?s x category)Validate x against ?s, bridging to hive-dsl Result.
(r/ok x) on success; (r/err category {:explanation <humanized>}) on failure.
category defaults to :extension/schema-violation.
Validate x against ?s, bridging to hive-dsl Result.
(r/ok x) on success; (r/err category {:explanation <humanized>}) on failure.
`category` defaults to :extension/schema-violation.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 |