Skip to content

Commit

Permalink
Spec append_event(s)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaikuchn authored Nov 17, 2023
1 parent 9c95410 commit 19026e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/event_store/event_store.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ defmodule Shared.EventStore do
alias Shared.EventStoreEvent
require Logger

@spec append_event(list(struct()) | struct(), keyword | map) :: {:ok, list(EventStore.EventData.t())}
def append_event(domain_events, metadata) do
domain_events = List.wrap(domain_events)

Expand All @@ -34,6 +35,7 @@ defmodule Shared.EventStore do
{:ok, appended_events}
end

@spec append_event(String.t(), list(struct()) | struct(), keyword | map) :: {:ok, list(EventStore.EventData.t())}
def append_event(
stream_uuid,
domain_events,
Expand All @@ -53,6 +55,7 @@ defmodule Shared.EventStore do
end
end

@spec append_events(String.t(), list(struct()) | struct(), keyword | map) :: {:ok, list(EventStore.EventData.t())}
def append_events(stream_uuid, domain_events, metadata),
do: append_event(stream_uuid, domain_events, metadata)

Expand Down

0 comments on commit 19026e4

Please sign in to comment.