Documentation
¶
Index ¶
- type BaseAggregate
- func (b *BaseAggregate) ApplyEventHelper(aggregate Handler, event *event.DomainEvent, commit bool) error
- func (b *BaseAggregate) ClearUnCommitedEvents()
- func (b *BaseAggregate) GetID() string
- func (b *BaseAggregate) GetTypeName(source interface{}) (reflect.Type, string)
- func (b *BaseAggregate) GetVersion() int
- func (b *BaseAggregate) IncrementVersion()
- func (b *BaseAggregate) UnCommitedEvents() []event.DomainEvent
- type Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseAggregate ¶
type BaseAggregate struct { // The aggregate ID ID string // The aggregate type Type string // The aggregate version Version int // The aggregate events Events []event.DomainEvent }
func (*BaseAggregate) ApplyEventHelper ¶
func (b *BaseAggregate) ApplyEventHelper(aggregate Handler, event *event.DomainEvent, commit bool) error
func (*BaseAggregate) ClearUnCommitedEvents ¶
func (b *BaseAggregate) ClearUnCommitedEvents()
func (*BaseAggregate) GetID ¶
func (b *BaseAggregate) GetID() string
func (*BaseAggregate) GetTypeName ¶
func (b *BaseAggregate) GetTypeName(source interface{}) (reflect.Type, string)
func (*BaseAggregate) GetVersion ¶
func (b *BaseAggregate) GetVersion() int
func (*BaseAggregate) IncrementVersion ¶
func (b *BaseAggregate) IncrementVersion()
func (*BaseAggregate) UnCommitedEvents ¶
func (b *BaseAggregate) UnCommitedEvents() []event.DomainEvent
type Handler ¶
type Handler interface { LoadFromHistory(events []event.DomainEvent) error ApplyEvent(event *event.DomainEvent) error ApplyEventHelper(aggregate Handler, event *event.DomainEvent, commit bool) error // HandleCommand(command interface{}) error UnCommitedEvents() []event.DomainEvent ClearUnCommitedEvents() IncrementVersion() GetID() string GetTypeName(source interface{}) (reflect.Type, string) GetVersion() int }
Click to show internal directories.
Click to hide internal directories.