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

@@ -59,6 +59,10 @@ func (e *HumanAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConstrain
return []*eventstore.EventUniqueConstraint{NewAddUsernameUniqueConstraint(e.UserName, e.Aggregate().ResourceOwner, e.userLoginMustBeDomain)}
}
func (e *HumanAddedEvent) Assets() []*eventstore.Asset {
return nil
}
func (e *HumanAddedEvent) AddAddressData(
country,
locality,
@@ -166,6 +170,10 @@ func (e *HumanRegisteredEvent) UniqueConstraints() []*eventstore.EventUniqueCons
return []*eventstore.EventUniqueConstraint{NewAddUsernameUniqueConstraint(e.UserName, e.Aggregate().ResourceOwner, e.userLoginMustBeDomain)}
}
func (e *HumanRegisteredEvent) Assets() []*eventstore.Asset {
return nil
}
func (e *HumanRegisteredEvent) AddAddressData(
country,
locality,
@@ -252,6 +260,10 @@ func (e *HumanInitialCodeAddedEvent) UniqueConstraints() []*eventstore.EventUniq
return nil
}
func (e *HumanInitialCodeAddedEvent) Assets() []*eventstore.Asset {
return nil
}
func NewHumanInitialCodeAddedEvent(
ctx context.Context,
aggregate *eventstore.Aggregate,
@@ -293,6 +305,10 @@ func (e *HumanInitialCodeSentEvent) UniqueConstraints() []*eventstore.EventUniqu
return nil
}
func (e *HumanInitialCodeSentEvent) Assets() []*eventstore.Asset {
return nil
}
func NewHumanInitialCodeSentEvent(ctx context.Context, aggregate *eventstore.Aggregate) *HumanInitialCodeSentEvent {
return &HumanInitialCodeSentEvent{
BaseEvent: *eventstore.NewBaseEventForPush(
@@ -321,6 +337,10 @@ func (e *HumanInitializedCheckSucceededEvent) UniqueConstraints() []*eventstore.
return nil
}
func (e *HumanInitializedCheckSucceededEvent) Assets() []*eventstore.Asset {
return nil
}
func NewHumanInitializedCheckSucceededEvent(ctx context.Context, aggregate *eventstore.Aggregate) *HumanInitializedCheckSucceededEvent {
return &HumanInitializedCheckSucceededEvent{
BaseEvent: *eventstore.NewBaseEventForPush(
@@ -349,6 +369,10 @@ func (e *HumanInitializedCheckFailedEvent) UniqueConstraints() []*eventstore.Eve
return nil
}
func (e *HumanInitializedCheckFailedEvent) Assets() []*eventstore.Asset {
return nil
}
func NewHumanInitializedCheckFailedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *HumanInitializedCheckFailedEvent {
return &HumanInitializedCheckFailedEvent{
BaseEvent: *eventstore.NewBaseEventForPush(
@@ -379,6 +403,10 @@ func (e *HumanSignedOutEvent) UniqueConstraints() []*eventstore.EventUniqueConst
return nil
}
func (e *HumanSignedOutEvent) Assets() []*eventstore.Asset {
return nil
}
func NewHumanSignedOutEvent(
ctx context.Context,
aggregate *eventstore.Aggregate,