Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { EventDelegate *ycq.DelegateEventFactory StreamNameDelegate *ycq.DelegateStreamNamer AggregateDelegate *ycq.DelegateAggregateFactory // contains filtered or unexported fields }
Account is the repository of bank accounts
func NewAccount ¶
NewAccount returns a new account repository instance
type AccountRepository ¶
type AccountRepository interface { Load(string, string) (*aggregates.Account, error) Save(ycq.AggregateRoot, *int) error }
AccountRepository is the interface for a repository for bank accounts
type InMemoryAccount ¶
type InMemoryAccount struct {
// contains filtered or unexported fields
}
InMemoryAccount is a in memory repository for bank accounts used for testing
func NewInMemoryAccount ¶
func NewInMemoryAccount(eventbus ycq.EventBus) *InMemoryAccount
func (*InMemoryAccount) Load ¶
func (r *InMemoryAccount) Load(aggregateType, id string) (*aggregates.Account, error)
Load loads an aggregate of the specified type.
func (*InMemoryAccount) Save ¶
func (r *InMemoryAccount) Save(aggregate ycq.AggregateRoot, _ *int) error
Save persists an aggregate.
Click to show internal directories.
Click to hide internal directories.