Raxol.Core.Runtime.Plugins.PluginMetadataProvider.Behaviour behaviour (Raxol v0.5.0)
View SourceDefines the behaviour for plugin metadata providers.
This behaviour is responsible for:
- Providing plugin metadata (ID, version, dependencies)
- Validating plugin metadata
- Managing plugin metadata lifecycle
Summary
Callbacks
Gets the metadata for a plugin.
Gets the plugin behaviours from metadata.
Gets the plugin config schema from metadata.
Gets the plugin dependencies from metadata. Returns a list of dependencies, each being either
Gets the plugin ID from metadata.
Gets the plugin optional dependencies from metadata. Returns a list of dependencies, each being either
Gets the plugin version from metadata.
Validates plugin metadata.
Types
@type dependency() :: {String.t(), version_constraint()} | String.t()
@type metadata() :: %{ id: String.t(), version: String.t(), name: String.t(), description: String.t(), author: String.t(), dependencies: [dependency()], optional_dependencies: [dependency()], config_schema: map() | nil, behaviours: [module()] }
@type version_constraint() :: String.t()
Callbacks
Gets the metadata for a plugin.
Gets the plugin behaviours from metadata.
Gets the plugin config schema from metadata.
@callback get_plugin_dependencies(metadata :: metadata()) :: {:ok, [dependency()]} | {:error, any()}
Gets the plugin dependencies from metadata. Returns a list of dependencies, each being either:
- A tuple {plugin_id, version_constraint} for versioned dependencies
- A simple plugin_id string for unversioned dependencies
Gets the plugin ID from metadata.
@callback get_plugin_optional_dependencies(metadata :: metadata()) :: {:ok, [dependency()]} | {:error, any()}
Gets the plugin optional dependencies from metadata. Returns a list of dependencies, each being either:
- A tuple {plugin_id, version_constraint} for versioned dependencies
- A simple plugin_id string for unversioned dependencies
Gets the plugin version from metadata.
Validates plugin metadata.