| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Eventful.TestHelpers
Description
Common test functionality
Synopsis
- newtype Counter = Counter {}
- type CounterProjection = Projection Counter CounterEvent
- counterProjection :: CounterProjection
- type CounterAggregate = Aggregate Counter CounterEvent CounterCommand
- counterAggregate :: CounterAggregate
- data CounterEvent
- = Added { }
- | CounterFailedOutOfBounds
- data CounterCommand
- newtype EventStoreRunner m = EventStoreRunner (forall a. (EventStoreWriter m CounterEvent -> VersionedEventStoreReader m CounterEvent -> m a) -> IO a)
- newtype GlobalStreamEventStoreRunner m = GlobalStreamEventStoreRunner (forall a. (EventStoreWriter m CounterEvent -> GlobalEventStoreReader m CounterEvent -> m a) -> IO a)
- eventStoreSpec :: Monad m => EventStoreRunner m -> Spec
- globalStreamEventStoreSpec :: Monad m => GlobalStreamEventStoreRunner m -> Spec
- newtype VersionedProjectionCacheRunner m = VersionedProjectionCacheRunner (forall a. (EventStoreWriter m CounterEvent -> VersionedEventStoreReader m CounterEvent -> VersionedProjectionCache Counter m -> m a) -> IO a)
- versionedProjectionCacheSpec :: Monad m => VersionedProjectionCacheRunner m -> Spec
- newtype GlobalStreamProjectionCacheRunner m = GlobalStreamProjectionCacheRunner (forall a. (EventStoreWriter m CounterEvent -> GlobalEventStoreReader m CounterEvent -> GlobalStreamProjectionCache Text Counter m -> m a) -> IO a)
- globalStreamProjectionCacheSpec :: Monad m => GlobalStreamProjectionCacheRunner m -> Spec
- data Text
- module Control.Monad.Logger
- module Control.Monad.IO.Class
- module Control.Monad
Documentation
Example Projection/Aggregate
data CounterEvent #
Constructors
| Added | |
Fields | |
| CounterFailedOutOfBounds | |
Instances
| Eq CounterEvent # | |
Defined in Eventful.TestHelpers | |
| Show CounterEvent # | |
Defined in Eventful.TestHelpers Methods showsPrec :: Int -> CounterEvent -> ShowS # show :: CounterEvent -> String # showList :: [CounterEvent] -> ShowS # | |
| ToJSON CounterEvent # | |
Defined in Eventful.TestHelpers Methods toJSON :: CounterEvent -> Value # toEncoding :: CounterEvent -> Encoding # toJSONList :: [CounterEvent] -> Value # toEncodingList :: [CounterEvent] -> Encoding # | |
| FromJSON CounterEvent # | |
Defined in Eventful.TestHelpers | |
data CounterCommand #
Instances
| Eq CounterCommand # | |
Defined in Eventful.TestHelpers Methods (==) :: CounterCommand -> CounterCommand -> Bool # (/=) :: CounterCommand -> CounterCommand -> Bool # | |
| Show CounterCommand # | |
Defined in Eventful.TestHelpers Methods showsPrec :: Int -> CounterCommand -> ShowS # show :: CounterCommand -> String # showList :: [CounterCommand] -> ShowS # | |
| ToJSON CounterCommand # | |
Defined in Eventful.TestHelpers Methods toJSON :: CounterCommand -> Value # toEncoding :: CounterCommand -> Encoding # toJSONList :: [CounterCommand] -> Value # toEncodingList :: [CounterCommand] -> Encoding # | |
| FromJSON CounterCommand # | |
Defined in Eventful.TestHelpers Methods parseJSON :: Value -> Parser CounterCommand # parseJSONList :: Value -> Parser [CounterCommand] # | |
newtype EventStoreRunner m #
Constructors
| EventStoreRunner (forall a. (EventStoreWriter m CounterEvent -> VersionedEventStoreReader m CounterEvent -> m a) -> IO a) |
newtype GlobalStreamEventStoreRunner m #
Constructors
| GlobalStreamEventStoreRunner (forall a. (EventStoreWriter m CounterEvent -> GlobalEventStoreReader m CounterEvent -> m a) -> IO a) |
eventStoreSpec :: Monad m => EventStoreRunner m -> Spec #
globalStreamEventStoreSpec :: Monad m => GlobalStreamEventStoreRunner m -> Spec #
newtype VersionedProjectionCacheRunner m #
Constructors
| VersionedProjectionCacheRunner (forall a. (EventStoreWriter m CounterEvent -> VersionedEventStoreReader m CounterEvent -> VersionedProjectionCache Counter m -> m a) -> IO a) |
versionedProjectionCacheSpec :: Monad m => VersionedProjectionCacheRunner m -> Spec #
newtype GlobalStreamProjectionCacheRunner m #
Constructors
| GlobalStreamProjectionCacheRunner (forall a. (EventStoreWriter m CounterEvent -> GlobalEventStoreReader m CounterEvent -> GlobalStreamProjectionCache Text Counter m -> m a) -> IO a) |
A space efficient, packed, unboxed Unicode text type.
Instances
| ToJSON Text | |
Defined in Data.Aeson.Types.ToJSON | |
| KeyValue Object | Constructs a singleton |
| KeyValue Pair | |
| ToJSONKey Text | |
Defined in Data.Aeson.Types.ToJSON | |
| FromJSON Text | |
| FromJSONKey Text | |
Defined in Data.Aeson.Types.FromJSON | |
| Chunk Text | |
Defined in Data.Attoparsec.Internal.Types | |
| ToLogStr Text | |
Defined in System.Log.FastLogger.LogStr | |
| FromPairs Value (DList Pair) | |
Defined in Data.Aeson.Types.ToJSON | |
| v ~ Value => KeyValuePair v (DList Pair) | |
Defined in Data.Aeson.Types.ToJSON | |
| type State Text | |
Defined in Data.Attoparsec.Internal.Types | |
| type ChunkElem Text | |
Defined in Data.Attoparsec.Internal.Types | |
| type Item Text | |
module Control.Monad.Logger
module Control.Monad.IO.Class
module Control.Monad