Module: Lyra
- Defined in:
- lib/lyra.rb,
lib/lyra/event.rb,
lib/lyra/engine.rb,
lib/lyra/command.rb,
lib/lyra/version.rb,
lib/lyra/aggregate.rb,
lib/lyra/dual_view.rb,
lib/lyra/event_flow.rb,
lib/lyra/projection.rb,
lib/lyra/correlation.rb,
lib/lyra/schema/diff.rb,
lib/lyra/event_mapper.rb,
lib/lyra/id_generator.rb,
lib/lyra/schema/store.rb,
lib/lyra/configuration.rb,
lib/lyra/event_analyzer.rb,
lib/lyra/command_handler.rb,
lib/lyra/schema/reporter.rb,
lib/lyra/schema/generator.rb,
lib/lyra/schema/validator.rb,
lib/lyra/privacy/pii_masker.rb,
lib/lyra/strict_data_access.rb,
lib/lyra/event_store_adapter.rb,
lib/lyra/privacy/pii_detector.rb,
lib/lyra/visualization/timeline.rb,
lib/lyra/privacy/gdpr_compliance.rb,
lib/lyra/associations/event_aware.rb,
lib/lyra/visualization/event_graph.rb,
lib/lyra/privacy/policy_integration.rb,
app/controllers/lyra/flow_controller.rb,
lib/lyra/projections/cached_relation.rb,
lib/lyra/consistency/read_your_writes.rb,
lib/lyra/projections/model_projection.rb,
lib/lyra/schema/event_class_registrar.rb,
lib/lyra/interceptors/crud_interceptor.rb,
lib/lyra/projections/cached_projection.rb,
app/controllers/lyra/privacy_controller.rb,
lib/lyra/projections/event_store_reader.rb,
lib/lyra/visualization/activity_heatmap.rb,
lib/lyra/verification/workflow_generator.rb,
app/controllers/lyra/dashboard_controller.rb,
lib/lyra/projections/async_projection_job.rb,
app/controllers/lyra/application_controller.rb,
lib/lyra/interceptors/association_interceptor.rb,
lib/lyra/verification/crud_lifecycle_workflow.rb
Defined Under Namespace
Modules: Associations, Commands, Consistency, Events, Interceptors, Privacy, Projections, Schema, StrictDataAccess, StrictDataAccessClassMethods, StrictDataAccessRelation, Verification, Visualization Classes: Aggregate, ApplicationController, AuditMapper, AuditProjection, Causation, Command, CommandHandler, CommandResult, Configuration, Correlation, CustomEventStoreAdapter, DashboardController, DefaultMapper, DualView, Engine, Error, Event, EventAnalyzer, EventFlow, EventMapper, EventRegistry, EventStoreAdapter, FlowController, GenericAggregate, IdGenerator, ModelConfiguration, PrivacyController, Projection, RailsEventStoreAdapter, StateAnalyzer, StateProjection, StrictDataAccessViolation, UserActionContext
Constant Summary collapse
- VERSION =
"0.6.0"
Class Method Summary collapse
- .config ⇒ Object
- .configure {|config| ... } ⇒ Object
- .disabled_mode? ⇒ Boolean
- .event_sourcing_mode? ⇒ Boolean
-
.event_store ⇒ Object
Delegate event_store to configuration.
- .event_store=(store) ⇒ Object
- .hijack_mode? ⇒ Boolean
- .monitor_mode? ⇒ Boolean
-
.pam_dsl_available? ⇒ Boolean
Check if PAM DSL is available for privacy features.
-
.petri_flow_available? ⇒ Boolean
Check if PetriFlow is available for formal verification.
-
.privacy_features_available? ⇒ Boolean
Check if privacy features are available.
-
.reset_config! ⇒ Object
Reset configuration (useful for testing).
-
.verification_available? ⇒ Boolean
Check if formal verification features are available.
-
.verify_crud_mapping ⇒ Hash
Run formal verification of CRUD→Event mapping.
-
.without_strict_access ⇒ Object
Temporarily bypass strict data access checks Use this for legitimate bulk operations in migrations, seeds, etc.
Class Method Details
.config ⇒ Object
116 117 118 |
# File 'lib/lyra/configuration.rb', line 116 def self.config @config ||= Configuration.new end |
.configure {|config| ... } ⇒ Object
92 93 94 |
# File 'lib/lyra.rb', line 92 def self.configure yield config if block_given? end |
.disabled_mode? ⇒ Boolean
108 109 110 |
# File 'lib/lyra.rb', line 108 def self.disabled_mode? config.disabled_mode? end |
.event_sourcing_mode? ⇒ Boolean
104 105 106 |
# File 'lib/lyra.rb', line 104 def self.event_sourcing_mode? config.event_sourcing_mode? end |
.event_store ⇒ Object
Delegate event_store to configuration
113 114 115 |
# File 'lib/lyra.rb', line 113 def self.event_store config.event_store end |
.event_store=(store) ⇒ Object
117 118 119 |
# File 'lib/lyra.rb', line 117 def self.event_store=(store) config.event_store = store end |
.hijack_mode? ⇒ Boolean
100 101 102 |
# File 'lib/lyra.rb', line 100 def self.hijack_mode? config.hijack_mode? end |
.monitor_mode? ⇒ Boolean
96 97 98 |
# File 'lib/lyra.rb', line 96 def self.monitor_mode? config.monitor_mode? end |
.pam_dsl_available? ⇒ Boolean
Check if PAM DSL is available for privacy features
122 123 124 |
# File 'lib/lyra.rb', line 122 def self.pam_dsl_available? PAM_DSL_AVAILABLE end |
.petri_flow_available? ⇒ Boolean
Check if PetriFlow is available for formal verification
132 133 134 |
# File 'lib/lyra.rb', line 132 def self.petri_flow_available? PETRI_FLOW_AVAILABLE end |
.privacy_features_available? ⇒ Boolean
Check if privacy features are available
127 128 129 |
# File 'lib/lyra.rb', line 127 def self.privacy_features_available? pam_dsl_available? end |
.reset_config! ⇒ Object
Reset configuration (useful for testing)
121 122 123 |
# File 'lib/lyra/configuration.rb', line 121 def self.reset_config! @config = Configuration.new end |
.verification_available? ⇒ Boolean
Check if formal verification features are available
137 138 139 |
# File 'lib/lyra.rb', line 137 def self.verification_available? petri_flow_available? end |
.verify_crud_mapping ⇒ Hash
Run formal verification of CRUD→Event mapping
144 145 146 147 148 149 |
# File 'lib/lyra.rb', line 144 def self.verify_crud_mapping raise "PetriFlow is required for formal verification" unless petri_flow_available? verifier = Verification::CrudVerifier.new verifier.verify_all end |
.without_strict_access ⇒ Object
Temporarily bypass strict data access checks Use this for legitimate bulk operations in migrations, seeds, etc.
356 357 358 359 360 361 362 |
# File 'lib/lyra/strict_data_access.rb', line 356 def self.without_strict_access previous = Thread.current[:lyra_bypass_strict_access] Thread.current[:lyra_bypass_strict_access] = true yield ensure Thread.current[:lyra_bypass_strict_access] = previous end |