Raxol.Core.Runtime.Plugins.PluginValidator (Raxol v2.0.1)
View SourceComprehensive validation system for plugins before loading.
This module provides extensive validation checks including security, compatibility, performance, and structural validation to ensure plugins are safe and properly implemented.
REFACTORED: All try/catch blocks replaced with functional patterns using with statements.
Summary
Functions
Resolves plugin identity from string or module.
Validates that a plugin module implements the required behaviour.
Validates plugin compatibility with the current system.
Validates plugin dependencies.
Validates plugin metadata and configuration.
Validates that a plugin is not already loaded.
Validates plugin performance characteristics.
Performs comprehensive validation of a plugin.
Validates plugin security aspects.
Types
Functions
@spec resolve_plugin_identity(String.t() | module()) :: {:ok, {String.t(), module()}} | {:error, term()}
Resolves plugin identity from string or module.
@spec validate_behaviour(module()) :: validation_result()
Validates that a plugin module implements the required behaviour.
@spec validate_compatibility(module()) :: validation_result()
Validates plugin compatibility with the current system.
@spec validate_dependencies(module(), map()) :: validation_result()
Validates plugin dependencies.
@spec validate_metadata(module()) :: validation_result()
Validates plugin metadata and configuration.
@spec validate_not_loaded(String.t(), map()) :: validation_result()
Validates that a plugin is not already loaded.
@spec validate_performance(module()) :: validation_result()
Validates plugin performance characteristics.
@spec validate_plugin(String.t(), module(), map(), map()) :: validation_result()
Performs comprehensive validation of a plugin.
@spec validate_security(module(), map()) :: validation_result()
Validates plugin security aspects.