edomata.core

package edomata.core

Members list

Type members

Classlikes

final case class Action[F[_], R, E, N, A](run: F[ResponseD[R, E, N, A]])

A monad transformer for ResponseD

A monad transformer for ResponseD

Type parameters

A

output type

E

domain event type

F

effect type

N

notification type

R

rejection type

Attributes

Companion
object
Source
Action.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
Action.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Show all
Self type
Action.type
sealed transparent trait ActionCatsInstances

Attributes

Source
Action.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Action.type
sealed transparent trait ActionConstructors

Attributes

Source
Action.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Action.type
final class CQRSDomain[C, S, R, N](dummy: Boolean) extends AnyVal

Attributes

Source
CQRSModel.scala
Supertypes
class AnyVal
trait Matchable
class Any
final class CQRSDomainDSL[C, S, R, N](dummy: Boolean) extends AnyVal

Attributes

Source
CQRSDomainDSL.scala
Supertypes
class AnyVal
trait Matchable
class Any

Attributes

Source
CQRSModel.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object TestCQRSModel.type
Self type
CQRSModel[State, Rejection]

Representation of a standard command message

Representation of a standard command message

Type parameters

C

Command payload which is your command model

Attributes

Companion
object
Source
RequestContext.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
RequestContext.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait Decision[+R, +E, +A] extends Product, Serializable

Represents programs that decide in an event driven context

Represents programs that decide in an event driven context

This is basically a simple state machine like the following:

[*] -> InDecisive
InDecisive -- event --> Accepted
InDecisive -- join --> InDecisive
InDecisive -- rejection --> Rejected (resets and terminates)
Accepted -- event --> Accepted (accumulates)
Accepted -- rejection --> Rejected (resets and terminates)

It forms a monad error and also is traversable.

Type parameters

A

program output type

E

event type

R

rejection type

Attributes

Companion
object
Source
Decision.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
class Accepted[E, T]
class InDecisive[T]
class Rejected[R]
Self type
Decision[R, E, A]

Attributes

Companion
trait
Source
Decision.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Show all
Self type
Decision.type

Attributes

Source
Decision.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Decision.type
sealed trait DecisionCatsInstances1

Attributes

Source
Decision.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Decision.type
sealed trait DecisionConstructors

Attributes

Source
Decision.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Decision.type
final case class DecisionT[F[_], R, E, A](run: F[Decision[R, E, A]])

This is monad transformer for Decision

This is monad transformer for Decision

Type parameters

A

program output type

E

event type

F

effect type

R

rejection type

Attributes

Companion
object
Source
DecisionT.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
DecisionT.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Show all
Self type
DecisionT.type
sealed transparent trait DecisionTCatsInstances

Attributes

Source
DecisionT.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object DecisionT.type
sealed transparent trait DecisionTConstructors

Attributes

Source
DecisionT.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object DecisionT.type
final class Domain[C, S, E, R, N](dummy: Boolean) extends AnyVal

Attributes

Source
DomainDSL.scala
Supertypes
class AnyVal
trait Matchable
class Any

Attributes

Source
DomainCompiler.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final class DomainDSL[C, S, E, R, N](dummy: Boolean) extends AnyVal

Attributes

Source
DomainDSL.scala
Supertypes
class AnyVal
trait Matchable
class Any

A purely functional, event driven domain model

A purely functional, event driven domain model

Type parameters

Event

domain events

Rejection

domain error type

State

state model of your program, a.k.a aggregate root

Attributes

Source
Model.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object TestDomain.type
Self type
DomainModel[State, Event, Rejection]
final case class Edomaton[F[_], -Env, R, E, N, A](run: Env => F[ResponseD[R, E, N, A]]) extends AnyVal

Represents programs that are event driven state machines (a Mealy machine)

Represents programs that are event driven state machines (a Mealy machine)

these programs can use input to decide on a state transition, and optionally emit a sequence of notifications for communication.

Type parameters

A

output type

E

internal event type

Env

input type

F

effect type

N

notification type, a.k.a external event, integration event

R

rejection type

Attributes

Companion
object
Source
Edomaton.scala
Supertypes
trait Serializable
trait Product
trait Equals
class AnyVal
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
Edomaton.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Edomaton.type
sealed transparent trait EdomatonConstructors

Attributes

Source
Edomaton.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Edomaton.type
sealed transparent trait EdomatonInstances

Attributes

Source
Edomaton.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Edomaton.type
enum EdomatonResult[S, E, R, N]

Representation of the result of running an edomaton

Representation of the result of running an edomaton

Attributes

Source
DomainCompiler.scala
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Representation of a standard message metadata

Representation of a standard message metadata

Attributes

Companion
object
Source
RequestContext.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
RequestContext.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait ModelTC[State, Event, Rejection]

A type class that captures domain model

A type class that captures domain model

note that due to uniqueness requirements for this typeclass, it is sealed and the only way to create an instance is through implementing DomainModel.

so don't create several instances as it is a bad idea and may change your domain model behavior in different contexts!

Attributes

Source
Model.scala
Supertypes
class Object
trait Matchable
class Any
trait RaiseError[F[_], R]

Attributes

Companion
object
Source
RaiseError.scala
Supertypes
class Object
trait Matchable
class Any
object RaiseError

Attributes

Companion
trait
Source
RaiseError.scala
Supertypes
class Object
trait Matchable
class Any
Self type
RaiseError.type
final case class RequestContext[+C, +S](command: CommandMessage[C], state: S)

Representation of a standard input for an Edomaton

Representation of a standard input for an Edomaton

Type parameters

C

Command type

S

State model type

Attributes

Source
RequestContext.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ResponseD

Attributes

Source
ResponseD.scala
Supertypes
class Object
trait Matchable
class Any
Self type
ResponseD.type
object ResponseE

Attributes

Source
ResponseE.scala
Supertypes
class Object
trait Matchable
class Any
Self type
ResponseE.type
final case class ResponseT[+RES[_], +R, +N, +A](result: RES[A], notifications: Chain[N])

Representation of programs that decide and emit notifications

Representation of programs that decide and emit notifications

This adds capability of emiting notifications/integration events to effectful programs

Type parameters

A

output type

N

notification type

R

rejection type

RES

effect type

Attributes

Companion
object
Source
ResponseT.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
ResponseT.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Show all
Self type
ResponseT.type

Attributes

Source
ResponseT.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ResponseT.type

Attributes

Source
ResponseT.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
sealed trait ResponseT2Constructors

Attributes

Source
ResponseT.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ResponseT.type

Attributes

Source
CQRSModel.scala
Supertypes
class Object
trait Matchable
class Any
final case class Stomaton[F[_], -Env, S, R, E, A](run: (Env, S) => F[ResponseE[R, E, (S, A)]]) extends AnyVal

Attributes

Companion
object
Source
Stomaton.scala
Supertypes
trait Serializable
trait Product
trait Equals
class AnyVal
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
Stomaton.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Stomaton.type
sealed transparent trait StomatonConstructors

Attributes

Source
Stomaton.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Stomaton.type
sealed transparent trait StomatonInstances

Attributes

Source
Stomaton.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Stomaton.type

Types

type DomainService[F[_], C, R] = C => F[EitherNec[R, Unit]]

Attributes

Source
DomainCompiler.scala
type ResponseD[+R, +E, +N, +A] = ResponseT[[_] =>> Decision[R, E, _$1], R, N, A]

Representation of programs that decide and emit notifications

Representation of programs that decide and emit notifications

This adds capability of emiting notifications/integration events to Decision programs

Type parameters

A

output type

E

domain event type

N

notification type

R

rejection type

Attributes

Source
ResponseD.scala
type ResponseE[+R, +N, +A] = ResponseT[[_] =>> EitherNec[R, _$1], R, N, A]

Representation of programs that decide and emit notifications

Representation of programs that decide and emit notifications

This adds capability of emiting notifications/integration events to cats.data.EitherNec programs

Type parameters

A

output type

N

notification type

R

rejection type

Attributes

Source
ResponseE.scala

Deprecated types

type Response[+R, +E, +N, +A] = ResponseD[R, E, N, A]

Representation of programs that decide and emit notifications

Representation of programs that decide and emit notifications

This adds capability of emiting notifications/integration events to Decision programs

Type parameters

A

output type

E

domain event type

N

notification type

R

rejection type

Attributes

Deprecated
true
Source
Response.scala

Value members

Deprecated fields

val Response: ResponseD.type

Attributes

Deprecated
true
Source
Response.scala