Behaviour and registry helpers for optional command providers.
A provider is configured with:
config :ferricstore, :command_extensions, [MyApp.Commands]Providers declare command metadata with commands/0 and execute commands
with handle/3. The core dispatcher uses this metadata for routing and key
ACL extraction, while leaving command semantics in the provider module.
access describes the command's key footprint. acl_categories independently
controls category grants and defaults to READ or WRITE for the matching
access mode.
Summary
Functions
Returns true when a configured provider owns the command.
Returns the key access type for a configured command.
Returns configured command names in uppercase form.
Returns normalized command metadata from all configured providers.
Dispatches a configured command to its provider module.
Extracts key arguments for a configured command.
Looks up configured command metadata by command name.
Looks up configured command metadata by an already-uppercase command name.
Returns intrinsic OSS and configured provider modules.
Returns the access type for a non-shadowing configured command.
Returns non-shadowing command names assigned to an ACL category.
Returns uppercase configured command names excluding built-in shadows.
Returns configured command metadata excluding names already owned by built-in commands.
Resolves one immutable provider snapshot for preparation and dispatch.
Returns trusted request context attached by the server protocol layer.
Types
@type access() :: :read | :write | :rw
@type command_entry() :: %{ :name => binary(), optional(:arity) => integer(), optional(:flags) => [binary()], optional(:first_key) => integer(), optional(:last_key) => integer(), optional(:step) => integer(), optional(:access) => access(), optional(:acl_categories) => [acl_category()], optional(:summary) => binary() }
Callbacks
Functions
Returns true when a configured provider owns the command.
Returns the key access type for a configured command.
Returns configured command names in uppercase form.
@spec commands() :: [map()]
Returns normalized command metadata from all configured providers.
Dispatches a configured command to its provider module.
Extracts key arguments for a configured command.
Looks up configured command metadata by command name.
Looks up configured command metadata by an already-uppercase command name.
@spec modules() :: [module()]
Returns intrinsic OSS and configured provider modules.
Returns the access type for a non-shadowing configured command.
Returns non-shadowing command names assigned to an ACL category.
Returns uppercase configured command names excluding built-in shadows.
@spec non_shadowing_commands() :: [map()]
Returns configured command metadata excluding names already owned by built-in commands.
Resolves one immutable provider snapshot for preparation and dispatch.
Returns trusted request context attached by the server protocol layer.
Extension providers can use this to read authenticated subject, tenant, and scope data without parsing command arguments as authority.