feat: add assets to eventstore and event (#1674)

* fix: add assets to eventstore and event

* fix: project member, grant member, app changed tests

* fix: asset migrations

* feat: add asset tests

* feat: add asset tests

* Update internal/eventstore/repository/repository.go

Co-authored-by: Livio Amstutz <livio.a@gmail.com>

* feat: add asset tests

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Fabi
2021-04-27 12:58:18 +02:00
committed by GitHub
parent eaf966e3d2
commit f51f0ede5c
102 changed files with 1079 additions and 34 deletions

View File

@@ -57,6 +57,10 @@ func (e *UserLockedEvent) UniqueConstraints() []*eventstore.EventUniqueConstrain
return nil
}
func (e *UserLockedEvent) Assets() []*eventstore.Asset {
return nil
}
func NewUserLockedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *UserLockedEvent {
return &UserLockedEvent{
BaseEvent: *eventstore.NewBaseEventForPush(
@@ -85,6 +89,10 @@ func (e *UserUnlockedEvent) UniqueConstraints() []*eventstore.EventUniqueConstra
return nil
}
func (e *UserUnlockedEvent) Assets() []*eventstore.Asset {
return nil
}
func NewUserUnlockedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *UserUnlockedEvent {
return &UserUnlockedEvent{
BaseEvent: *eventstore.NewBaseEventForPush(
@@ -113,6 +121,10 @@ func (e *UserDeactivatedEvent) UniqueConstraints() []*eventstore.EventUniqueCons
return nil
}
func (e *UserDeactivatedEvent) Assets() []*eventstore.Asset {
return nil
}
func NewUserDeactivatedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *UserDeactivatedEvent {
return &UserDeactivatedEvent{
BaseEvent: *eventstore.NewBaseEventForPush(
@@ -141,6 +153,10 @@ func (e *UserReactivatedEvent) UniqueConstraints() []*eventstore.EventUniqueCons
return nil
}
func (e *UserReactivatedEvent) Assets() []*eventstore.Asset {
return nil
}
func NewUserReactivatedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *UserReactivatedEvent {
return &UserReactivatedEvent{
BaseEvent: *eventstore.NewBaseEventForPush(
@@ -172,6 +188,10 @@ func (e *UserRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueConstrai
return []*eventstore.EventUniqueConstraint{NewRemoveUsernameUniqueConstraint(e.userName, e.Aggregate().ResourceOwner, e.loginMustBeDomain)}
}
func (e *UserRemovedEvent) Assets() []*eventstore.Asset {
return nil
}
func NewUserRemovedEvent(
ctx context.Context,
aggregate *eventstore.Aggregate,
@@ -215,6 +235,10 @@ func (e *UserTokenAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConst
return nil
}
func (e *UserTokenAddedEvent) Assets() []*eventstore.Asset {
return nil
}
func NewUserTokenAddedEvent(
ctx context.Context,
aggregate *eventstore.Aggregate,
@@ -273,6 +297,10 @@ func (e *DomainClaimedEvent) UniqueConstraints() []*eventstore.EventUniqueConstr
}
}
func (e *DomainClaimedEvent) Assets() []*eventstore.Asset {
return nil
}
func NewDomainClaimedEvent(
ctx context.Context,
aggregate *eventstore.Aggregate,
@@ -316,6 +344,10 @@ func (e *DomainClaimedSentEvent) UniqueConstraints() []*eventstore.EventUniqueCo
return nil
}
func (e *DomainClaimedSentEvent) Assets() []*eventstore.Asset {
return nil
}
func NewDomainClaimedSentEvent(
ctx context.Context,
aggregate *eventstore.Aggregate,
@@ -354,6 +386,10 @@ func (e *UsernameChangedEvent) UniqueConstraints() []*eventstore.EventUniqueCons
}
}
func (e *UsernameChangedEvent) Assets() []*eventstore.Asset {
return nil
}
func NewUsernameChangedEvent(
ctx context.Context,
aggregate *eventstore.Aggregate,