Skip to content

Commit

Permalink
Derive Jason.Encoder protocol for `Commanded.EventStore.SnapshotDat…
Browse files Browse the repository at this point in the history
…a` struct
  • Loading branch information
slashdotdash committed Jan 21, 2019
1 parent bfb8771 commit a494204
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
17 changes: 9 additions & 8 deletions lib/commanded/event_store/snapshot_data.ex
Expand Up @@ -4,20 +4,21 @@ defmodule Commanded.EventStore.SnapshotData do
"""

@type t :: %Commanded.EventStore.SnapshotData{
source_uuid: String.t,
source_version: non_neg_integer,
source_type: String.t,
data: binary,
metadata: binary,
created_at: NaiveDateTime.t,
}
source_uuid: String.t(),
source_version: non_neg_integer,
source_type: String.t(),
data: binary,
metadata: binary,
created_at: NaiveDateTime.t()
}

@derive Jason.Encoder
defstruct [
:source_uuid,
:source_version,
:source_type,
:data,
:metadata,
:created_at,
:created_at
]
end
2 changes: 1 addition & 1 deletion mix.lock
Expand Up @@ -2,7 +2,7 @@
"dialyxir": {:hex, :dialyxir, "0.5.1", "b331b091720fd93e878137add264bac4f644e1ddae07a70bf7062c7862c4b952", [:mix], [], "hexpm"},
"earmark": {:hex, :earmark, "1.3.1", "73812f447f7a42358d3ba79283cfa3075a7580a3a2ed457616d6517ac3738cb9", [:mix], [], "hexpm"},
"elixir_uuid": {:hex, :elixir_uuid, "1.2.0", "ff26e938f95830b1db152cb6e594d711c10c02c6391236900ddd070a6b01271d", [:mix], [], "hexpm"},
"ex_doc": {:hex, :ex_doc, "0.19.2", "6f4081ccd9ed081b6dc0bd5af97a41e87f5554de469e7d76025fba535180565f", [:mix], [{:earmark, "~> 1.2", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.10", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm"},
"ex_doc": {:hex, :ex_doc, "0.19.3", "6a2e0f4ab70cbf3c87ec91650645d5eb3fc08a171a808db20893472ee01616d6", [:mix], [{:earmark, "~> 1.2", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.10", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm"},
"file_system": {:hex, :file_system, "0.2.6", "fd4dc3af89b9ab1dc8ccbcc214a0e60c41f34be251d9307920748a14bf41f1d3", [:mix], [], "hexpm"},
"jason": {:hex, :jason, "1.1.2", "b03dedea67a99223a2eaf9f1264ce37154564de899fd3d8b9a21b1a6fd64afe7", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm"},
"makeup": {:hex, :makeup, "0.8.0", "9cf32aea71c7fe0a4b2e9246c2c4978f9070257e5c9ce6d4a28ec450a839b55f", [:mix], [{:nimble_parsec, "~> 0.5.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm"},
Expand Down

0 comments on commit a494204

Please sign in to comment.