kvasir_agent v0.0.3 Kvasir.Agent.Entity behaviour View Source

Link to this section Summary

Link to this section Functions

Link to this macro entity(opts \\ [], block) View Source (macro)
Link to this macro upgrade(version, list) View Source (macro)
Link to this macro version(version, updated \\ nil) View Source (macro)

Link to this section Callbacks

Link to this callback __decode__({}) View Source
__decode__({Version.t(), term()}) :: term()
Link to this callback __encode__(term) View Source
__encode__(term()) :: {Version.t(), term()}
Link to this callback apply(state, event) View Source
apply(state :: any(), event :: map()) :: {:ok, any()} | {:error, atom()}
Link to this callback base(id) View Source
base(id :: any()) :: any()
Link to this callback execute(state, command) View Source
execute(state :: any(), command :: map()) ::
  :ok | {:ok, map()} | {:ok, [map()]} | {:error, atom()}