序
本文主要研究一下go.cqrs的DomainRepository
DomainRepository
// DomainRepository is the interface that all domain repositories should implement.
type DomainRepository interface {
//Loads an aggregate of the given type and ID
Load(aggregateTypeName string, aggregateID string) (AggregateRoot, error)
//Saves the aggregate.
Save(aggregate AggregateRoot, expectedVersion *int) error
}
复制代码