View Source OnePiece.Commanded.TypeProvider (OnePiece.Commanded v0.5.0)
Implements Commanded.EventStore.TypeProvider
behavior. Using macros to generate the behavior.
Link to this section Summary
Functions
Imports all the types from another module defined by OnePiece.Commanded.TypeProvider.TypeProvider
.
Registers a mapping from an name string to an Elixir Module that defines a struct.
Link to this section Functions
Specs
Imports all the types from another module defined by OnePiece.Commanded.TypeProvider.TypeProvider
.
Example
defmodule UserTypeProvider do
use OnePiece.Commanded.TypeProvider
# ...
end
defmodule MyAppTypeProvider do
use OnePiece.Commanded.TypeProvider
import_type_provider UserTypeProvider
end
Specs
Registers a mapping from an name string to an Elixir Module that defines a struct.
Example
defmodule MyTypeProvider do
use OnePiece.Commanded.TypeProvider
register_type("account_created", AccountCreated)
end