feat: asset storage (#1696)

* feat: remove assets

* feat: minio implementation

* fix: remove assets from tests

* feat: minio implementation

* feat: Env vars

* fix: sprintf

* fix: sprintf

* Update internal/eventstore/repository/repository.go

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

* fix: error handling

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Fabi
2021-05-03 10:15:50 +02:00
committed by GitHub
parent a5c6bf5498
commit 667cc30291
110 changed files with 306 additions and 938 deletions

View File

@@ -59,10 +59,6 @@ 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,
@@ -170,10 +166,6 @@ 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,
@@ -260,10 +252,6 @@ func (e *HumanInitialCodeAddedEvent) UniqueConstraints() []*eventstore.EventUniq
return nil
}
func (e *HumanInitialCodeAddedEvent) Assets() []*eventstore.Asset {
return nil
}
func NewHumanInitialCodeAddedEvent(
ctx context.Context,
aggregate *eventstore.Aggregate,
@@ -305,10 +293,6 @@ 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(
@@ -337,10 +321,6 @@ 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(
@@ -369,10 +349,6 @@ 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(
@@ -403,10 +379,6 @@ func (e *HumanSignedOutEvent) UniqueConstraints() []*eventstore.EventUniqueConst
return nil
}
func (e *HumanSignedOutEvent) Assets() []*eventstore.Asset {
return nil
}
func NewHumanSignedOutEvent(
ctx context.Context,
aggregate *eventstore.Aggregate,