Vibe.Storage.Representation.Event (vibe v0.2.3)

Copy Markdown View Source

Storage representation for semantic session events.

Summary

Types

t()

@type t() :: %Vibe.Storage.Representation.Event{
  at: DateTime.t(),
  data: map(),
  id: String.t(),
  seq: non_neg_integer() | nil,
  session_id: String.t(),
  type: atom()
}

Functions

decode_line(line)

@spec decode_line(String.t()) :: [{non_neg_integer(), Vibe.Event.t()}]

decode_map(map)

@spec decode_map(map()) :: {:ok, {non_neg_integer(), Vibe.Event.t()}} | :error

encode(event, seq)

@spec encode(Vibe.Event.t(), non_neg_integer()) :: map()