Raxol.Audit.Storage (Raxol v2.0.1)
View SourceFunctional version of the specialized storage backend for audit logs with indexing and search capabilities.
This module provides efficient storage and retrieval of audit events with support for complex queries, full-text search, and compliance reporting, using pure functional error handling patterns instead of try/catch blocks.
Summary
Functions
Returns a specification to start this module under a supervisor.
Creates an index on a specific field for faster queries.
Deletes events older than the specified timestamp.
Gets events within a time range.
Gets storage statistics.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.
Queries audit events with filters and options.
Queries audit events with filters and options from a specific storage.
Stores a batch of audit events.
Types
@type query_filter() :: %{ optional(:user_id) => String.t(), optional(:event_type) => atom(), optional(:severity) => atom(), optional(:start_time) => integer(), optional(:end_time) => integer(), optional(:resource_type) => String.t(), optional(:resource_id) => String.t(), optional(:ip_address) => String.t(), optional(:session_id) => String.t(), optional(:text_search) => String.t() }
@type query_options() :: %{ optional(:limit) => pos_integer(), optional(:offset) => non_neg_integer(), optional(:sort_by) => atom(), optional(:sort_order) => :asc | :desc, optional(:include_metadata) => boolean() }
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Creates an index on a specific field for faster queries.
Deletes events older than the specified timestamp.
Gets events within a time range.
Gets storage statistics.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.
Queries audit events with filters and options.
Queries audit events with filters and options from a specific storage.
Stores a batch of audit events.