ExESDBGater.Messages.AuditMessages (ex_esdb_gater v0.8.0)

Message definitions and helpers for the :ex_esdb_audit PubSub instance.

Handles audit trail events for compliance and tracking who did what.

Common Topics

  • "data_changes" - Data modification events
  • "admin_actions" - Administrative actions
  • "access_logs" - Resource access logging
  • "compliance" - Compliance-related events

Summary

Functions

Create an AccessLog payload with current timestamp

Create an AdminAction payload with current timestamp

Broadcast an access log audit event

Broadcast an administrative action audit event

Broadcast a compliance event

Broadcast a data change audit event

Create a ComplianceEvent payload with current timestamp

Create a DataChange payload with current timestamp

Validate and extract a secure message

Functions

access_log(user_id, resource_type, resource_id, action, success, opts \\ [])

Create an AccessLog payload with current timestamp

admin_action(admin_user_id, action_type, target_resource, opts \\ [])

Create an AdminAction payload with current timestamp

broadcast_access_log(topic, payload)

Broadcast an access log audit event

broadcast_admin_action(topic, payload)

Broadcast an administrative action audit event

broadcast_compliance_event(topic, payload)

Broadcast a compliance event

broadcast_data_change(topic, payload)

Broadcast a data change audit event

compliance_event(event_type, compliance_rule, affected_data, action_taken, opts \\ [])

Create a ComplianceEvent payload with current timestamp

data_change(user_id, resource_type, resource_id, action, opts \\ [])

Create a DataChange payload with current timestamp

secure_broadcast(topic, message)

validate_secure_message(arg1)

Validate and extract a secure message