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

@@ -52,10 +52,6 @@ func (e *UserGrantAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConst
return []*eventstore.EventUniqueConstraint{NewAddUserGrantUniqueConstraint(e.Aggregate().ResourceOwner, e.UserID, e.ProjectID, e.ProjectGrantID)}
}
func (e *UserGrantAddedEvent) Assets() []*eventstore.Asset {
return nil
}
func NewUserGrantAddedEvent(
ctx context.Context,
aggregate *eventstore.Aggregate,
@@ -102,10 +98,6 @@ func (e *UserGrantChangedEvent) UniqueConstraints() []*eventstore.EventUniqueCon
return nil
}
func (e *UserGrantChangedEvent) Assets() []*eventstore.Asset {
return nil
}
func NewUserGrantChangedEvent(
ctx context.Context,
aggregate *eventstore.Aggregate,
@@ -146,10 +138,6 @@ func (e *UserGrantCascadeChangedEvent) UniqueConstraints() []*eventstore.EventUn
return nil
}
func (e *UserGrantCascadeChangedEvent) Assets() []*eventstore.Asset {
return nil
}
func NewUserGrantCascadeChangedEvent(
ctx context.Context,
aggregate *eventstore.Aggregate,
@@ -192,10 +180,6 @@ func (e *UserGrantRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueCon
return []*eventstore.EventUniqueConstraint{NewRemoveUserGrantUniqueConstraint(e.Aggregate().ResourceOwner, e.userID, e.projectID, e.projectGrantID)}
}
func (e *UserGrantRemovedEvent) Assets() []*eventstore.Asset {
return nil
}
func NewUserGrantRemovedEvent(
ctx context.Context,
aggregate *eventstore.Aggregate,
@@ -236,10 +220,6 @@ func (e *UserGrantCascadeRemovedEvent) UniqueConstraints() []*eventstore.EventUn
return []*eventstore.EventUniqueConstraint{NewRemoveUserGrantUniqueConstraint(e.Aggregate().ResourceOwner, e.userID, e.projectID, e.projectGrantID)}
}
func (e *UserGrantCascadeRemovedEvent) Assets() []*eventstore.Asset {
return nil
}
func NewUserGrantCascadeRemovedEvent(
ctx context.Context,
aggregate *eventstore.Aggregate,
@@ -277,10 +257,6 @@ func (e *UserGrantDeactivatedEvent) UniqueConstraints() []*eventstore.EventUniqu
return nil
}
func (e *UserGrantDeactivatedEvent) Assets() []*eventstore.Asset {
return nil
}
func NewUserGrantDeactivatedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *UserGrantDeactivatedEvent {
return &UserGrantDeactivatedEvent{
BaseEvent: *eventstore.NewBaseEventForPush(
@@ -309,10 +285,6 @@ func (e *UserGrantReactivatedEvent) UniqueConstraints() []*eventstore.EventUniqu
return nil
}
func (e *UserGrantReactivatedEvent) Assets() []*eventstore.Asset {
return nil
}
func NewUserGrantReactivatedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *UserGrantReactivatedEvent {
return &UserGrantReactivatedEvent{
BaseEvent: *eventstore.NewBaseEventForPush(