From eebd5c797a6012fab9602a4e19ff6c653a0865c1 Mon Sep 17 00:00:00 2001 From: Piotr Ferenc Date: Fri, 26 Jul 2024 22:18:36 +0200 Subject: [PATCH] Remove EventStore and ProcessEvent implementations Deleted the EventStore interface and the ProcessEvent-related structures and methods. These changes were made to simplify the internal event handling mechanism and eliminate unused code. --- internal/events/proces_events.go | 27 --------------------------- internal/repositories/event-store.go | 7 ------- 2 files changed, 34 deletions(-) delete mode 100644 internal/events/proces_events.go delete mode 100644 internal/repositories/event-store.go diff --git a/internal/events/proces_events.go b/internal/events/proces_events.go deleted file mode 100644 index e4ea343..0000000 --- a/internal/events/proces_events.go +++ /dev/null @@ -1,27 +0,0 @@ -package events - -import ( - "github.com/PiotrFerenc/mash2/internal/types" - "github.com/google/uuid" - "time" -) - -type Event struct { - CreatedAt time.Time - StreamId uuid.UUID -} - -type ProcessEvent interface { - ProcessEvent() *Event -} - -type ProcessCreated struct { - Process types.Process -} - -func (p ProcessCreated) ProcessEvent() *Event { - return &Event{ - CreatedAt: time.Now(), - StreamId: p.Process.Id, - } -} diff --git a/internal/repositories/event-store.go b/internal/repositories/event-store.go deleted file mode 100644 index d313b5c..0000000 --- a/internal/repositories/event-store.go +++ /dev/null @@ -1,7 +0,0 @@ -package repositories - -import "github.com/PiotrFerenc/mash2/internal/events" - -type EventStore interface { - AddEvent(event events.Event) error -}