From fa91c2a22dc281665accec0ee15c3492d2eb3a20 Mon Sep 17 00:00:00 2001 From: mkelvers Date: Tue, 26 May 2026 16:13:56 +0200 Subject: [PATCH] feat: add audit event domain type and service interface --- internal/domain/audit.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 internal/domain/audit.go diff --git a/internal/domain/audit.go b/internal/domain/audit.go new file mode 100644 index 0000000..60ef37c --- /dev/null +++ b/internal/domain/audit.go @@ -0,0 +1,21 @@ +package domain + +import ( + "context" + "encoding/json" +) + +type AuditEvent struct { + UserID string + Action string + ResourceType string + ResourceID string + MetadataJSON json.RawMessage + IP string + UserAgent string +} + +type AuditService interface { + Record(ctx context.Context, event AuditEvent) error +} +