Documentation
¶
Index ¶
- func Run(eventBus eventhorizon.EventBus, commandBus eventhorizon.CommandBus, ...)
- type AcceptInvite
- type CreateInvite
- type DeclineInvite
- type GuestList
- type GuestListProjector
- type Invitation
- type InvitationAggregate
- type InvitationProjector
- type InviteAccepted
- type InviteCreated
- type InviteDeclined
- type NewEventStoreFunc
- type NewReadRepositoryFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(eventBus eventhorizon.EventBus, commandBus eventhorizon.CommandBus, newEventStore NewEventStoreFunc, newReadRepository NewReadRepositoryFunc)
Run runs the test scenario with the given EventStore and CommandBus. EventStores and ReadRepositories are created as needed with the given functions.
Types ¶
type AcceptInvite ¶
type AcceptInvite struct {
InvitationID string
}
func (*AcceptInvite) AggregateID ¶
func (c *AcceptInvite) AggregateID() string
func (*AcceptInvite) AggregateType ¶
func (c *AcceptInvite) AggregateType() string
func (*AcceptInvite) CommandType ¶
func (c *AcceptInvite) CommandType() string
type CreateInvite ¶
func (*CreateInvite) AggregateID ¶
func (c *CreateInvite) AggregateID() string
func (*CreateInvite) AggregateType ¶
func (c *CreateInvite) AggregateType() string
func (*CreateInvite) CommandType ¶
func (c *CreateInvite) CommandType() string
type DeclineInvite ¶
type DeclineInvite struct {
InvitationID string
}
func (*DeclineInvite) AggregateID ¶
func (c *DeclineInvite) AggregateID() string
func (*DeclineInvite) AggregateType ¶
func (c *DeclineInvite) AggregateType() string
func (*DeclineInvite) CommandType ¶
func (c *DeclineInvite) CommandType() string
type GuestListProjector ¶
type GuestListProjector struct {
// contains filtered or unexported fields
}
GuestListProjector projects guest lists. Note, it currently only works for one guest list.
func NewGuestListProjector ¶
func NewGuestListProjector(repository eventhorizon.ReadRepository, eventID string) *GuestListProjector
NewGuestListProjector creates a new GuestListProjector.
func (*GuestListProjector) HandleEvent ¶
func (p *GuestListProjector) HandleEvent(event eventhorizon.Event)
HandleEvent handles events that GuestListProjector is concerned about. HandleEvent builds guest lists.
type Invitation ¶
type InvitationAggregate ¶
type InvitationAggregate struct { *eventhorizon.AggregateBase // contains filtered or unexported fields }
func (*InvitationAggregate) AggregateType ¶
func (i *InvitationAggregate) AggregateType() string
func (*InvitationAggregate) ApplyEvent ¶
func (i *InvitationAggregate) ApplyEvent(event eventhorizon.Event)
func (*InvitationAggregate) HandleCommand ¶
func (i *InvitationAggregate) HandleCommand(command eventhorizon.Command) error
type InvitationProjector ¶
type InvitationProjector struct {
// contains filtered or unexported fields
}
func NewInvitationProjector ¶
func NewInvitationProjector(repository eventhorizon.ReadRepository) *InvitationProjector
func (*InvitationProjector) HandleEvent ¶
func (p *InvitationProjector) HandleEvent(event eventhorizon.Event)
type InviteAccepted ¶
type InviteAccepted struct {
InvitationID string `bson:"invitation_id" json:"id"`
}
func (*InviteAccepted) AggregateID ¶
func (c *InviteAccepted) AggregateID() string
func (*InviteAccepted) AggregateType ¶
func (c *InviteAccepted) AggregateType() string
func (*InviteAccepted) EventType ¶
func (c *InviteAccepted) EventType() string
type InviteCreated ¶
type InviteCreated struct { InvitationID string `bson:"invitation_id" json:"id"` EventID string `bson:"event_id" json:"event_id"` Name string `bson:"name" json:"name"` Age int `bson:"age" json:"age"` }
func (*InviteCreated) AggregateID ¶
func (c *InviteCreated) AggregateID() string
func (*InviteCreated) AggregateType ¶
func (c *InviteCreated) AggregateType() string
func (*InviteCreated) EventType ¶
func (c *InviteCreated) EventType() string
type InviteDeclined ¶
type InviteDeclined struct {
InvitationID string `bson:"invitation_id" json:"id"`
}
func (*InviteDeclined) AggregateID ¶
func (c *InviteDeclined) AggregateID() string
func (*InviteDeclined) AggregateType ¶
func (c *InviteDeclined) AggregateType() string
func (*InviteDeclined) EventType ¶
func (c *InviteDeclined) EventType() string
type NewEventStoreFunc ¶
type NewEventStoreFunc func() (eventhorizon.EventStore, error)
NewEventStoreFunc creates a new EventStore
type NewReadRepositoryFunc ¶
type NewReadRepositoryFunc func(string) (eventhorizon.ReadRepository, error)
NewReadRepositoryFunc creates a new ReadRepository
Click to show internal directories.
Click to hide internal directories.