mirror of
https://github.com/zitadel/zitadel.git
synced 2025-02-28 22:47:23 +00:00
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:
parent
a5c6bf5498
commit
667cc30291
@ -13,6 +13,14 @@ export ZITADEL_TRACING_TYPE=google
|
||||
|
||||
export ZITADEL_METRICS_TYPE=otel
|
||||
|
||||
# S3 Storage
|
||||
export ZITADEL_ASSET_STORAGE_TYPE=minio
|
||||
export ZITADEL_ASSET_STORAGE_ENDPOINT=storage.googleapis.com
|
||||
export ZITADEL_ASSET_STORAGE_ACCESS_KEY_ID=
|
||||
export ZITADEL_ASSET_STORAGE_SECRET_ACCESS_KEY=
|
||||
export ZITADEL_ASSET_STORAGE_SSL=
|
||||
export ZITADEL_ASSET_STORAGE_LOCATION=
|
||||
|
||||
# Log
|
||||
export ZITADEL_LOG_LEVEL=debug
|
||||
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
"github.com/caos/zitadel/internal/config/types"
|
||||
"github.com/caos/zitadel/internal/eventstore"
|
||||
"github.com/caos/zitadel/internal/query"
|
||||
"github.com/caos/zitadel/internal/static/s3"
|
||||
metrics "github.com/caos/zitadel/internal/telemetry/metrics/config"
|
||||
"github.com/caos/zitadel/openapi"
|
||||
|
||||
@ -38,6 +39,7 @@ type Config struct {
|
||||
Log logging.Config
|
||||
Tracing tracing.TracingConfig
|
||||
Metrics metrics.MetricsConfig
|
||||
AssetStorage s3.AssetStorage
|
||||
InternalAuthZ internal_authz.Config
|
||||
SystemDefaults sd.SystemDefaults
|
||||
|
||||
|
@ -11,6 +11,15 @@ Tracing:
|
||||
Fraction: $ZITADEL_TRACING_FRACTION
|
||||
Endpoint: $ZITADEL_TRACING_ENDPOINT
|
||||
|
||||
AssetStorage:
|
||||
Type: $ZITADEL_ASSET_STORAGE_TYPE
|
||||
Config:
|
||||
Endpoint: $ZITADEL_ASSET_STORAGE_ENDPOINT
|
||||
AccessKeyID: $ZITADEL_ASSET_STORAGE_ACCESS_KEY_ID
|
||||
SecretAccessKey: $ZITADEL_ASSET_STORAGE_SECRET_ACCESS_KEY
|
||||
SSL: $ZITADEL_ASSET_STORAGE_SSL
|
||||
Location: $ZITADEL_ASSET_STORAGE_LOCATION
|
||||
|
||||
Metrics:
|
||||
Type: 'otel'
|
||||
Config:
|
||||
|
1
go.mod
1
go.mod
@ -45,6 +45,7 @@ require (
|
||||
github.com/lib/pq v1.9.0
|
||||
github.com/manifoldco/promptui v0.7.0
|
||||
github.com/mattn/go-colorable v0.1.8 // indirect; indirect github.com/mitchellh/copystructure v1.0.0 // indirect
|
||||
github.com/minio/minio-go/v7 v7.0.10
|
||||
github.com/mitchellh/copystructure v1.1.2 // indirect
|
||||
github.com/nicksnyder/go-i18n/v2 v2.1.1
|
||||
github.com/pkg/errors v0.9.1
|
||||
|
13
go.sum
13
go.sum
@ -599,6 +599,9 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW
|
||||
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
|
||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
|
||||
github.com/klauspost/cpuid v1.3.1 h1:5JNjFYYQrZeKRJ0734q51WCEEn2huer72Dc7K+R/b6s=
|
||||
github.com/klauspost/cpuid v1.3.1/go.mod h1:bYW4mA6ZgKPob1/Dlai2LviZJO7KGI3uoWLd42rAQw4=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
@ -671,6 +674,12 @@ github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182aff
|
||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4=
|
||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
|
||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
github.com/minio/md5-simd v1.1.0 h1:QPfiOqlZH+Cj9teu0t9b1nTBfPbyTl16Of5MeuShdK4=
|
||||
github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw=
|
||||
github.com/minio/minio-go/v7 v7.0.10 h1:1oUKe4EOPUEhw2qnPQaPsJ0lmVTYLFu03SiItauXs94=
|
||||
github.com/minio/minio-go/v7 v7.0.10/go.mod h1:td4gW1ldOsj1PbSNS+WYK43j+P1XVhX/8W8awaYlBFo=
|
||||
github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU=
|
||||
github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM=
|
||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||
github.com/mitchellh/copystructure v1.1.2 h1:Th2TIvG1+6ma3e/0/bopBKohOTY7s4dA8V2q4EUcBJ0=
|
||||
github.com/mitchellh/copystructure v1.1.2/go.mod h1:EBArHfARyrSWO/+Wyr9zwEkc6XMFB9XyNgFNmRkZZU4=
|
||||
@ -808,6 +817,7 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik=
|
||||
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
|
||||
github.com/rs/xid v1.2.1 h1:mhH9Nq+C1fY2l1XIpgxIiUOfNpRBYH1kKcr+qfKgjRc=
|
||||
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
|
||||
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
|
||||
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
|
||||
@ -976,6 +986,7 @@ golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPh
|
||||
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 h1:It14KIkyBFYkHkwZ7k45minvA9aorojkyjGk9KJ5B/w=
|
||||
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
|
||||
@ -1365,6 +1376,8 @@ gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:a
|
||||
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/ini.v1 v1.57.0 h1:9unxIsFcTt4I55uWluz+UmL95q4kdJ0buvQ1ZIqVQww=
|
||||
gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
|
||||
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
||||
gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
|
||||
|
@ -88,7 +88,6 @@ func TestCommandSide_AddDefaultIDPConfig(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(idpconfig.NewAddIDPConfigNameUniqueConstraint("name1", "IAM")),
|
||||
),
|
||||
),
|
||||
@ -235,7 +234,6 @@ func TestCommandSide_ChangeDefaultIDPConfig(t *testing.T) {
|
||||
newDefaultIDPConfigChangedEvent(context.Background(), "config1", "name1", "name2", domain.IDPConfigStylingTypeUnspecified),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(idpconfig.NewRemoveIDPConfigNameUniqueConstraint("name1", "IAM")),
|
||||
uniqueConstraintsFromEventConstraint(idpconfig.NewAddIDPConfigNameUniqueConstraint("name2", "IAM")),
|
||||
),
|
||||
|
@ -226,7 +226,6 @@ func TestCommandSide_ChangeDefaultIDPOIDCConfig(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
secretCrypto: crypto.CreateMockEncryptionAlg(gomock.NewController(t)),
|
||||
|
@ -180,7 +180,6 @@ func TestCommandSide_AddIAMMember(t *testing.T) {
|
||||
[]string{"IAM_OWNER"}...,
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(member.NewAddMemberUniqueConstraint("IAM", "user1")),
|
||||
),
|
||||
),
|
||||
@ -231,7 +230,6 @@ func TestCommandSide_AddIAMMember(t *testing.T) {
|
||||
[]string{"IAM_OWNER"}...,
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(member.NewAddMemberUniqueConstraint("IAM", "user1")),
|
||||
),
|
||||
),
|
||||
@ -410,7 +408,6 @@ func TestCommandSide_ChangeIAMMember(t *testing.T) {
|
||||
[]string{"IAM_OWNER", "IAM_OWNER_VIEWER"}...,
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
zitadelRoles: []authz.RoleMapping{
|
||||
@ -531,7 +528,6 @@ func TestCommandSide_RemoveIAMMember(t *testing.T) {
|
||||
"user1",
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(member.NewRemoveMemberUniqueConstraint("IAM", "user1")),
|
||||
),
|
||||
),
|
||||
|
@ -95,7 +95,6 @@ func TestCommandSide_AddDefaultLabelPolicy(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -244,7 +243,6 @@ func TestCommandSide_ChangeDefaultLabelPolicy(t *testing.T) {
|
||||
newDefaultLabelPolicyChangedEvent(context.Background(), "primary-color-change", "secondary-color-change", false),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -83,7 +83,6 @@ func TestCommandSide_AddDefaultLoginPolicy(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -224,7 +223,6 @@ func TestCommandSide_ChangeDefaultLoginPolicy(t *testing.T) {
|
||||
newDefaultLoginPolicyChangedEvent(context.Background(), false, false, false, false, domain.PasswordlessTypeNotAllowed),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -394,7 +392,6 @@ func TestCommandSide_AddIDPProviderDefaultLoginPolicy(t *testing.T) {
|
||||
"config1"),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -558,7 +555,6 @@ func TestCommandSide_RemoveIDPProviderDefaultLoginPolicy(t *testing.T) {
|
||||
"config1"),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -605,7 +601,6 @@ func TestCommandSide_RemoveIDPProviderDefaultLoginPolicy(t *testing.T) {
|
||||
"config1"),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -671,7 +666,6 @@ func TestCommandSide_RemoveIDPProviderDefaultLoginPolicy(t *testing.T) {
|
||||
&user.NewAggregate("user1", "org1").Aggregate,
|
||||
"config1", "externaluser1")),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(user.NewRemoveExternalIDPUniqueConstraint("config1", "externaluser1")),
|
||||
),
|
||||
),
|
||||
@ -787,7 +781,6 @@ func TestCommandSide_AddSecondFactorDefaultLoginPolicy(t *testing.T) {
|
||||
domain.SecondFactorTypeOTP),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -920,7 +913,6 @@ func TestCommandSide_RemoveSecondFactorDefaultLoginPolicy(t *testing.T) {
|
||||
domain.SecondFactorTypeOTP),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -1024,7 +1016,6 @@ func TestCommandSide_AddMultiFactorDefaultLoginPolicy(t *testing.T) {
|
||||
domain.MultiFactorTypeU2FWithPIN),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -1157,7 +1148,6 @@ func TestCommandSide_RemoveMultiFactorDefaultLoginPolicy(t *testing.T) {
|
||||
domain.MultiFactorTypeU2FWithPIN),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -86,7 +86,6 @@ func TestCommandSide_AddDefaultMailTemplatePolicy(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -221,7 +220,6 @@ func TestCommandSide_ChangeDefaultMailTemplatePolicy(t *testing.T) {
|
||||
newDefaultMailTemplatePolicyChangedEvent(context.Background(), []byte("template-change")),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -107,7 +107,6 @@ func TestCommandSide_AddDefaultMailTextPolicy(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(policy.NewAddMailTextUniqueConstraint("IAM", "mail-text-type", "de")),
|
||||
),
|
||||
),
|
||||
@ -295,7 +294,6 @@ func TestCommandSide_ChangeDefaultMailTextPolicy(t *testing.T) {
|
||||
"button-text-change"),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -71,7 +71,6 @@ func TestCommandSide_AddDefaultOrgIAMPolicy(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -191,7 +190,6 @@ func TestCommandSide_ChangeDefaultOrgIAMPolicy(t *testing.T) {
|
||||
newDefaultOrgIAMPolicyChangedEvent(context.Background(), false),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -74,7 +74,6 @@ func TestCommandSide_AddDefaultPasswordAgePolicy(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -200,7 +199,6 @@ func TestCommandSide_ChangeDefaultPasswordAgePolicy(t *testing.T) {
|
||||
newDefaultPasswordAgePolicyChangedEvent(context.Background(), 125, 5),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -98,7 +98,6 @@ func TestCommandSide_AddDefaultPasswordComplexityPolicy(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -257,7 +256,6 @@ func TestCommandSide_ChangeDefaultPasswordComplexityPolicy(t *testing.T) {
|
||||
newDefaultPasswordComplexityPolicyChangedEvent(context.Background(), 10, false, false, false, false),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -74,7 +74,6 @@ func TestCommandSide_AddDefaultPasswordLockoutPolicy(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -200,7 +199,6 @@ func TestCommandSide_ChangeDefaultPasswordLockoutPolicy(t *testing.T) {
|
||||
newDefaultPasswordLockoutPolicyChangedEvent(context.Background(), 20, false),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -103,15 +103,15 @@ func (repo *testRepo) LatestSequence(ctx context.Context, queryFactory *reposito
|
||||
return repo.sequence, nil
|
||||
}
|
||||
|
||||
func expectPush(events []*repository.Event, assets []*repository.Asset, uniqueConstraints ...*repository.UniqueConstraint) expect {
|
||||
func expectPush(events []*repository.Event, uniqueConstraints ...*repository.UniqueConstraint) expect {
|
||||
return func(m *mock.MockRepository) {
|
||||
m.ExpectPush(events, assets, uniqueConstraints...)
|
||||
m.ExpectPush(events, uniqueConstraints...)
|
||||
}
|
||||
}
|
||||
|
||||
func expectPushFailed(err error, events []*repository.Event, assets []*repository.Asset, uniqueConstraints ...*repository.UniqueConstraint) expect {
|
||||
func expectPushFailed(err error, events []*repository.Event, uniqueConstraints ...*repository.UniqueConstraint) expect {
|
||||
return func(m *mock.MockRepository) {
|
||||
m.ExpectPushFailed(err, events, assets, uniqueConstraints...)
|
||||
m.ExpectPushFailed(err, events, uniqueConstraints...)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,6 @@ func TestCommandSide_AddOrgDomain(t *testing.T) {
|
||||
"domain.ch",
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -323,7 +322,6 @@ func TestCommandSide_GenerateOrgDomainValidation(t *testing.T) {
|
||||
},
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
secretGenerator: GetMockSecretGenerator(t),
|
||||
@ -376,7 +374,6 @@ func TestCommandSide_GenerateOrgDomainValidation(t *testing.T) {
|
||||
},
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
secretGenerator: GetMockSecretGenerator(t),
|
||||
@ -621,7 +618,6 @@ func TestCommandSide_ValidateOrgDomain(t *testing.T) {
|
||||
"domain.ch",
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
alg: crypto.CreateMockEncryptionAlg(gomock.NewController(t)),
|
||||
@ -680,7 +676,6 @@ func TestCommandSide_ValidateOrgDomain(t *testing.T) {
|
||||
"domain.ch",
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(org.NewAddOrgDomainUniqueConstraint("domain.ch")),
|
||||
),
|
||||
),
|
||||
@ -743,7 +738,6 @@ func TestCommandSide_ValidateOrgDomain(t *testing.T) {
|
||||
"domain.ch",
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(org.NewAddOrgDomainUniqueConstraint("domain.ch")),
|
||||
),
|
||||
),
|
||||
@ -833,7 +827,6 @@ func TestCommandSide_ValidateOrgDomain(t *testing.T) {
|
||||
false,
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(org.NewAddOrgDomainUniqueConstraint("domain.ch")),
|
||||
uniqueConstraintsFromEventConstraint(user.NewRemoveUsernameUniqueConstraint("username@domain.ch", "org2", false)),
|
||||
uniqueConstraintsFromEventConstraint(user.NewAddUsernameUniqueConstraint("tempid@temporary.zitadel.ch", "org2", false)),
|
||||
@ -1034,7 +1027,6 @@ func TestCommandSide_SetPrimaryDomain(t *testing.T) {
|
||||
"domain.ch",
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -1228,7 +1220,6 @@ func TestCommandSide_RemoveOrgDomain(t *testing.T) {
|
||||
"domain.ch", false,
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -1279,7 +1270,6 @@ func TestCommandSide_RemoveOrgDomain(t *testing.T) {
|
||||
"domain.ch", true,
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(org.NewRemoveOrgDomainUniqueConstraint("domain.ch")),
|
||||
),
|
||||
),
|
||||
|
@ -175,7 +175,6 @@ func TestCommandSide_SetOrgFeatures(t *testing.T) {
|
||||
newFeaturesSetEvent(context.Background(), "org1", "Test", domain.FeaturesStateActive, time.Hour),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
iamDomain: "iam-domain",
|
||||
@ -309,7 +308,6 @@ func TestCommandSide_SetOrgFeatures(t *testing.T) {
|
||||
newFeaturesSetEvent(context.Background(), "org1", "Test", domain.FeaturesStateActive, time.Hour),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(org.NewRemoveOrgDomainUniqueConstraint("test1")),
|
||||
),
|
||||
),
|
||||
@ -454,7 +452,6 @@ func TestCommandSide_SetOrgFeatures(t *testing.T) {
|
||||
newFeaturesSetEvent(context.Background(), "org1", "Test", domain.FeaturesStateActive, time.Hour),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(org.NewRemoveOrgDomainUniqueConstraint("test1")),
|
||||
),
|
||||
),
|
||||
@ -609,7 +606,6 @@ func TestCommandSide_SetOrgFeatures(t *testing.T) {
|
||||
newFeaturesSetEvent(context.Background(), "org1", "Test", domain.FeaturesStateActive, time.Hour),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(org.NewRemoveOrgDomainUniqueConstraint("test1")),
|
||||
),
|
||||
),
|
||||
@ -806,7 +802,6 @@ func TestCommandSide_SetOrgFeatures(t *testing.T) {
|
||||
newFeaturesSetEvent(context.Background(), "org1", "Test", domain.FeaturesStateActive, time.Hour),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
iamDomain: "iam-domain",
|
||||
@ -989,7 +984,6 @@ func TestCommandSide_RemoveOrgFeatures(t *testing.T) {
|
||||
org.NewFeaturesRemovedEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
iamDomain: "iam-domain",
|
||||
|
@ -116,7 +116,6 @@ func TestCommandSide_AddIDPConfig(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(idpconfig.NewAddIDPConfigNameUniqueConstraint("name1", "org1")),
|
||||
),
|
||||
),
|
||||
@ -283,7 +282,6 @@ func TestCommandSide_ChangeIDPConfig(t *testing.T) {
|
||||
newIDPConfigChangedEvent(context.Background(), "org1", "config1", "name1", "name2", domain.IDPConfigStylingTypeUnspecified),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(idpconfig.NewRemoveIDPConfigNameUniqueConstraint("name1", "org1")),
|
||||
uniqueConstraintsFromEventConstraint(idpconfig.NewAddIDPConfigNameUniqueConstraint("name2", "org1")),
|
||||
),
|
||||
|
@ -249,7 +249,6 @@ func TestCommandSide_ChangeIDPOIDCConfig(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
secretCrypto: crypto.CreateMockEncryptionAlg(gomock.NewController(t)),
|
||||
|
@ -196,7 +196,6 @@ func TestCommandSide_AddOrgMember(t *testing.T) {
|
||||
[]string{"ORG_OWNER"}...,
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(member.NewAddMemberUniqueConstraint("org1", "user1")),
|
||||
),
|
||||
),
|
||||
@ -250,7 +249,6 @@ func TestCommandSide_AddOrgMember(t *testing.T) {
|
||||
[]string{"ORG_OWNER"}...,
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(member.NewAddMemberUniqueConstraint("org1", "user1")),
|
||||
),
|
||||
),
|
||||
@ -445,7 +443,6 @@ func TestCommandSide_ChangeOrgMember(t *testing.T) {
|
||||
[]string{"ORG_OWNER", "ORG_OWNER_VIEWER"}...,
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
zitadelRoles: []authz.RoleMapping{
|
||||
@ -592,7 +589,6 @@ func TestCommandSide_RemoveOrgMember(t *testing.T) {
|
||||
"user1",
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(member.NewRemoveMemberUniqueConstraint("project1", "user1")),
|
||||
),
|
||||
),
|
||||
|
@ -118,7 +118,6 @@ func TestCommandSide_AddLabelPolicy(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -290,7 +289,6 @@ func TestCommandSide_ChangeLabelPolicy(t *testing.T) {
|
||||
newLabelPolicyChangedEvent(context.Background(), "org1", "primary-color-change", "secondary-color-change", false),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -404,7 +402,6 @@ func TestCommandSide_RemoveLabelPolicy(t *testing.T) {
|
||||
&org.NewAggregate("org1", "org1").Aggregate),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -158,7 +158,6 @@ func TestCommandSide_AddLoginPolicy(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
tokenVerifier: GetMockVerifier(t, domain.FeatureLoginPolicyUsernameLogin),
|
||||
@ -402,7 +401,6 @@ func TestCommandSide_ChangeLoginPolicy(t *testing.T) {
|
||||
newLoginPolicyChangedEvent(context.Background(), "org1", false, false, false, false, domain.PasswordlessTypeNotAllowed),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
tokenVerifier: GetMockVerifier(t, domain.FeatureLoginPolicyUsernameLogin),
|
||||
@ -525,7 +523,6 @@ func TestCommandSide_RemoveLoginPolicy(t *testing.T) {
|
||||
&org.NewAggregate("org1", "org1").Aggregate),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -710,7 +707,6 @@ func TestCommandSide_AddIDPProviderLoginPolicy(t *testing.T) {
|
||||
domain.IdentityProviderTypeOrg),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -905,7 +901,6 @@ func TestCommandSide_RemoveIDPProviderLoginPolicy(t *testing.T) {
|
||||
"config1"),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -956,7 +951,6 @@ func TestCommandSide_RemoveIDPProviderLoginPolicy(t *testing.T) {
|
||||
"config1"),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -1026,7 +1020,6 @@ func TestCommandSide_RemoveIDPProviderLoginPolicy(t *testing.T) {
|
||||
&user.NewAggregate("user1", "org1").Aggregate,
|
||||
"config1", "externaluser1")),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(user.NewRemoveExternalIDPUniqueConstraint("config1", "externaluser1")),
|
||||
),
|
||||
),
|
||||
@ -1160,7 +1153,6 @@ func TestCommandSide_AddSecondFactorLoginPolicy(t *testing.T) {
|
||||
domain.SecondFactorTypeOTP),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -1310,7 +1302,6 @@ func TestCommandSide_RemoveSecondFactoroginPolicy(t *testing.T) {
|
||||
domain.SecondFactorTypeOTP),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -1429,7 +1420,6 @@ func TestCommandSide_AddMultiFactorLoginPolicy(t *testing.T) {
|
||||
domain.MultiFactorTypeU2FWithPIN),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -1579,7 +1569,6 @@ func TestCommandSide_RemoveMultiFactorLoginPolicy(t *testing.T) {
|
||||
domain.MultiFactorTypeU2FWithPIN),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -92,7 +92,6 @@ func TestCommandSide_AddMailTemplate(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -233,7 +232,6 @@ func TestCommandSide_ChangeMailTemplate(t *testing.T) {
|
||||
newMailTemplateChangedEvent(context.Background(), "org1", "template2"),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -342,7 +340,6 @@ func TestCommandSide_RemoveMailTemplate(t *testing.T) {
|
||||
&org.NewAggregate("org1", "org1").Aggregate),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -160,7 +160,6 @@ func TestCommandSide_AddMailText(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(policy.NewAddMailTextUniqueConstraint("org1", "mail-text-type", "de")),
|
||||
),
|
||||
),
|
||||
@ -377,7 +376,6 @@ func TestCommandSide_ChangeMailText(t *testing.T) {
|
||||
"button-text-change"),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -514,7 +512,6 @@ func TestCommandSide_RemoveMailText(t *testing.T) {
|
||||
"de"),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(policy.NewRemoveMailTextUniqueConstraint("org1", "mail-text-type", "de")),
|
||||
),
|
||||
),
|
||||
|
@ -92,7 +92,6 @@ func TestCommandSide_AddOrgIAMPolicy(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -233,7 +232,6 @@ func TestCommandSide_ChangeOrgIAMPolicy(t *testing.T) {
|
||||
newOrgIAMPolicyChangedEvent(context.Background(), "org1", false),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -342,7 +340,6 @@ func TestCommandSide_RemoveOrgIAMPolicy(t *testing.T) {
|
||||
&org.NewAggregate("org1", "org1").Aggregate),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -96,7 +96,6 @@ func TestCommandSide_AddPasswordAgePolicy(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -244,7 +243,6 @@ func TestCommandSide_ChangePasswordAgePolicy(t *testing.T) {
|
||||
newPasswordAgePolicyChangedEvent(context.Background(), "org1", 150, 5),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -356,7 +354,6 @@ func TestCommandSide_RemovePasswordAgePolicy(t *testing.T) {
|
||||
&org.NewAggregate("org1", "org1").Aggregate),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -102,7 +102,6 @@ func TestCommandSide_AddPasswordComplexityPolicy(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -265,7 +264,6 @@ func TestCommandSide_ChangePasswordComplexityPolicy(t *testing.T) {
|
||||
newPasswordComplexityPolicyChangedEvent(context.Background(), "org1", 10, false, false, false, false),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -383,7 +381,6 @@ func TestCommandSide_RemovePasswordComplexityPolicy(t *testing.T) {
|
||||
&org.NewAggregate("org1", "org1").Aggregate),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -96,7 +96,6 @@ func TestCommandSide_AddPasswordLockoutPolicy(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -244,7 +243,6 @@ func TestCommandSide_ChangePasswordLockoutPolicy(t *testing.T) {
|
||||
newPasswordLockoutPolicyChangedEvent(context.Background(), "org1", 5, false),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -356,7 +354,6 @@ func TestCommandSide_RemovePasswordLockoutPolicy(t *testing.T) {
|
||||
&org.NewAggregate("org1", "org1").Aggregate),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -148,7 +148,6 @@ func TestCommandSide_AddOrg(t *testing.T) {
|
||||
&org.NewAggregate("org2", "org2").Aggregate,
|
||||
"user1", domain.RoleOrgOwner)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(org.NewAddOrgNameUniqueConstraint("Org")),
|
||||
uniqueConstraintsFromEventConstraint(org.NewAddOrgDomainUniqueConstraint("org.iam-domain")),
|
||||
uniqueConstraintsFromEventConstraint(member.NewAddMemberUniqueConstraint("org2", "user1")),
|
||||
@ -218,7 +217,6 @@ func TestCommandSide_AddOrg(t *testing.T) {
|
||||
&org.NewAggregate("org2", "org2").Aggregate,
|
||||
"user1", domain.RoleOrgOwner)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(org.NewAddOrgNameUniqueConstraint("Org")),
|
||||
uniqueConstraintsFromEventConstraint(org.NewAddOrgDomainUniqueConstraint("org.iam-domain")),
|
||||
uniqueConstraintsFromEventConstraint(member.NewAddMemberUniqueConstraint("org2", "user1")),
|
||||
@ -288,7 +286,6 @@ func TestCommandSide_AddOrg(t *testing.T) {
|
||||
domain.RoleOrgOwner,
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(org.NewAddOrgNameUniqueConstraint("Org")),
|
||||
uniqueConstraintsFromEventConstraint(org.NewAddOrgDomainUniqueConstraint("org.iam-domain")),
|
||||
uniqueConstraintsFromEventConstraint(member.NewAddMemberUniqueConstraint("org2", "user1")),
|
||||
@ -423,7 +420,6 @@ func TestCommandSide_DeactivateOrg(t *testing.T) {
|
||||
eventFromEventPusher(org.NewOrgDeactivatedEvent(context.Background(),
|
||||
&org.NewAggregate("org1", "org1").Aggregate)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -453,7 +449,6 @@ func TestCommandSide_DeactivateOrg(t *testing.T) {
|
||||
&org.NewAggregate("org1", "org1").Aggregate,
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -562,7 +557,6 @@ func TestCommandSide_ReactivateOrg(t *testing.T) {
|
||||
&org.NewAggregate("org1", "org1").Aggregate,
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -595,7 +589,6 @@ func TestCommandSide_ReactivateOrg(t *testing.T) {
|
||||
eventFromEventPusher(org.NewOrgReactivatedEvent(context.Background(),
|
||||
&org.NewAggregate("org1", "org1").Aggregate)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -139,7 +139,6 @@ func TestCommandSide_AddAPIApplication(t *testing.T) {
|
||||
domain.APIAuthMethodTypeBasic),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewAddApplicationUniqueConstraint("app", "project1")),
|
||||
),
|
||||
),
|
||||
@ -202,7 +201,6 @@ func TestCommandSide_AddAPIApplication(t *testing.T) {
|
||||
domain.APIAuthMethodTypePrivateKeyJWT),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewAddApplicationUniqueConstraint("app", "project1")),
|
||||
),
|
||||
),
|
||||
@ -420,7 +418,6 @@ func TestCommandSide_ChangeAPIApplication(t *testing.T) {
|
||||
domain.APIAuthMethodTypePrivateKeyJWT),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -583,7 +580,6 @@ func TestCommandSide_ChangeAPIApplicationSecret(t *testing.T) {
|
||||
}),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
secretGenerator: GetMockSecretGenerator(t),
|
||||
|
@ -154,7 +154,6 @@ func TestCommandSide_AddOIDCApplication(t *testing.T) {
|
||||
time.Second*1),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewAddApplicationUniqueConstraint("app", "project1")),
|
||||
),
|
||||
),
|
||||
@ -464,7 +463,6 @@ func TestCommandSide_ChangeOIDCApplication(t *testing.T) {
|
||||
"org1"),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -664,7 +662,6 @@ func TestCommandSide_ChangeOIDCApplicationSecret(t *testing.T) {
|
||||
}),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
secretGenerator: GetMockSecretGenerator(t),
|
||||
|
@ -159,7 +159,6 @@ func TestCommandSide_ChangeApplication(t *testing.T) {
|
||||
"app changed",
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewRemoveApplicationUniqueConstraint("app", "project1")),
|
||||
uniqueConstraintsFromEventConstraint(project.NewAddApplicationUniqueConstraint("app changed", "project1")),
|
||||
),
|
||||
@ -319,7 +318,6 @@ func TestCommandSide_DeactivateApplication(t *testing.T) {
|
||||
"app1",
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -474,7 +472,6 @@ func TestCommandSide_ReactivateApplication(t *testing.T) {
|
||||
"app1",
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -602,7 +599,6 @@ func TestCommandSide_RemoveApplication(t *testing.T) {
|
||||
"app",
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewRemoveApplicationUniqueConstraint("app", "project1")),
|
||||
),
|
||||
),
|
||||
|
@ -186,7 +186,6 @@ func TestCommandSide_AddProjectGrantMember(t *testing.T) {
|
||||
[]string{"PROJECT_GRANT_OWNER"}...,
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewAddProjectGrantMemberUniqueConstraint("project1", "user1", "projectgrant1")),
|
||||
),
|
||||
),
|
||||
@ -242,7 +241,6 @@ func TestCommandSide_AddProjectGrantMember(t *testing.T) {
|
||||
[]string{"PROJECT_GRANT_OWNER"}...,
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewAddProjectGrantMemberUniqueConstraint("project1", "user1", "projectgrant1")),
|
||||
),
|
||||
),
|
||||
@ -444,7 +442,6 @@ func TestCommandSide_ChangeProjectGrantMember(t *testing.T) {
|
||||
[]string{"PROJECT_GRANT_OWNER", "PROJECT_GRANT_VIEWER"}...,
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
zitadelRoles: []authz.RoleMapping{
|
||||
@ -612,7 +609,6 @@ func TestCommandSide_RemoveProjectGrantMember(t *testing.T) {
|
||||
"projectgrant1",
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewRemoveProjectGrantMemberUniqueConstraint("project1", "user1", "projectgrant1")),
|
||||
),
|
||||
),
|
||||
|
@ -179,7 +179,6 @@ func TestCommandSide_AddProjectGrant(t *testing.T) {
|
||||
[]string{"key1"},
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewAddProjectGrantUniqueConstraint("grantedorg1", "project1")),
|
||||
),
|
||||
),
|
||||
@ -512,7 +511,6 @@ func TestCommandSide_ChangeProjectGrant(t *testing.T) {
|
||||
[]string{"key1", "key2"},
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -593,7 +591,6 @@ func TestCommandSide_ChangeProjectGrant(t *testing.T) {
|
||||
[]string{"key1"},
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -688,7 +685,6 @@ func TestCommandSide_ChangeProjectGrant(t *testing.T) {
|
||||
[]string{"key1"},
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -899,7 +895,6 @@ func TestCommandSide_DeactivateProjectGrant(t *testing.T) {
|
||||
"projectgrant1",
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -1096,7 +1091,6 @@ func TestCommandSide_ReactivateProjectGrant(t *testing.T) {
|
||||
"projectgrant1",
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -1258,7 +1252,6 @@ func TestCommandSide_RemoveProjectGrant(t *testing.T) {
|
||||
"grantedorg1",
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewRemoveProjectGrantUniqueConstraint("grantedorg1", "project1")),
|
||||
),
|
||||
),
|
||||
@ -1305,7 +1298,6 @@ func TestCommandSide_RemoveProjectGrant(t *testing.T) {
|
||||
"grantedorg1",
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewRemoveProjectGrantUniqueConstraint("grantedorg1", "project1")),
|
||||
),
|
||||
),
|
||||
@ -1365,7 +1357,6 @@ func TestCommandSide_RemoveProjectGrant(t *testing.T) {
|
||||
"projectgrant1",
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewRemoveProjectGrantUniqueConstraint("grantedorg1", "project1")),
|
||||
uniqueConstraintsFromEventConstraint(usergrant.NewRemoveUserGrantUniqueConstraint("org1", "user1", "project1", "projectgrant1")),
|
||||
),
|
||||
|
@ -187,7 +187,6 @@ func TestCommandSide_AddProjectMember(t *testing.T) {
|
||||
[]string{"PROJECT_OWNER"}...,
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(member.NewAddMemberUniqueConstraint("project1", "user1")),
|
||||
),
|
||||
),
|
||||
@ -242,7 +241,6 @@ func TestCommandSide_AddProjectMember(t *testing.T) {
|
||||
[]string{"PROJECT_OWNER"}...,
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(member.NewAddMemberUniqueConstraint("project1", "user1")),
|
||||
),
|
||||
),
|
||||
@ -443,7 +441,6 @@ func TestCommandSide_ChangeProjectMember(t *testing.T) {
|
||||
[]string{"PROJECT_OWNER", "PROJECT_VIEWER"}...,
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
zitadelRoles: []authz.RoleMapping{
|
||||
@ -591,7 +588,6 @@ func TestCommandSide_RemoveProjectMember(t *testing.T) {
|
||||
"user1",
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(member.NewRemoveMemberUniqueConstraint("project1", "user1")),
|
||||
),
|
||||
),
|
||||
|
@ -119,7 +119,6 @@ func TestCommandSide_AddProjectRole(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewAddProjectRoleUniqueConstraint("key1", "project1")),
|
||||
),
|
||||
),
|
||||
@ -164,7 +163,6 @@ func TestCommandSide_AddProjectRole(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewAddProjectRoleUniqueConstraint("key1", "project1")),
|
||||
),
|
||||
),
|
||||
@ -334,7 +332,6 @@ func TestCommandSide_BulkAddProjectRole(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewAddProjectRoleUniqueConstraint("key1", "project1")),
|
||||
uniqueConstraintsFromEventConstraint(project.NewAddProjectRoleUniqueConstraint("key2", "project1")),
|
||||
),
|
||||
@ -393,7 +390,6 @@ func TestCommandSide_BulkAddProjectRole(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewAddProjectRoleUniqueConstraint("key1", "project1")),
|
||||
uniqueConstraintsFromEventConstraint(project.NewAddProjectRoleUniqueConstraint("key2", "project1")),
|
||||
),
|
||||
@ -633,7 +629,6 @@ func TestCommandSide_ChangeProjectRole(t *testing.T) {
|
||||
newRoleChangedEvent(context.Background(), "project1", "org1", "key1", "keychanged", "groupchanged"),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -811,7 +806,6 @@ func TestCommandSide_RemoveProjectRole(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewRemoveProjectRoleUniqueConstraint("key1", "project1")),
|
||||
),
|
||||
),
|
||||
@ -853,7 +847,6 @@ func TestCommandSide_RemoveProjectRole(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewRemoveProjectRoleUniqueConstraint("key1", "project1")),
|
||||
),
|
||||
),
|
||||
@ -912,7 +905,6 @@ func TestCommandSide_RemoveProjectRole(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewRemoveProjectRoleUniqueConstraint("key1", "project1")),
|
||||
),
|
||||
),
|
||||
@ -955,7 +947,6 @@ func TestCommandSide_RemoveProjectRole(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewRemoveProjectRoleUniqueConstraint("key1", "project1")),
|
||||
),
|
||||
),
|
||||
@ -1012,7 +1003,6 @@ func TestCommandSide_RemoveProjectRole(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewRemoveProjectRoleUniqueConstraint("key1", "project1")),
|
||||
),
|
||||
),
|
||||
|
@ -82,7 +82,6 @@ func TestCommandSide_AddProject(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewAddProjectNameUniqueConstraint("project", "org1")),
|
||||
uniqueConstraintsFromEventConstraint(member.NewAddMemberUniqueConstraint("project1", "user1")),
|
||||
),
|
||||
@ -130,7 +129,6 @@ func TestCommandSide_AddProject(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewAddProjectNameUniqueConstraint("project", "globalorg")),
|
||||
uniqueConstraintsFromEventConstraint(member.NewAddMemberUniqueConstraint("project1", "user1")),
|
||||
),
|
||||
@ -184,7 +182,6 @@ func TestCommandSide_AddProject(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewAddProjectNameUniqueConstraint("project", "org1")),
|
||||
uniqueConstraintsFromEventConstraint(member.NewAddMemberUniqueConstraint("project1", "user1")),
|
||||
),
|
||||
@ -394,7 +391,6 @@ func TestCommandSide_ChangeProject(t *testing.T) {
|
||||
true),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewRemoveProjectNameUniqueConstraint("project", "org1")),
|
||||
uniqueConstraintsFromEventConstraint(project.NewAddProjectNameUniqueConstraint("project-new", "org1")),
|
||||
),
|
||||
@ -448,7 +444,6 @@ func TestCommandSide_ChangeProject(t *testing.T) {
|
||||
true),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -638,7 +633,6 @@ func TestCommandSide_DeactivateProject(t *testing.T) {
|
||||
&project.NewAggregate("project1", "org1").Aggregate),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -815,7 +809,6 @@ func TestCommandSide_ReactivateProject(t *testing.T) {
|
||||
&project.NewAggregate("project1", "org1").Aggregate),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -966,7 +959,6 @@ func TestCommandSide_RemoveProject(t *testing.T) {
|
||||
"project"),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(project.NewRemoveProjectNameUniqueConstraint("project", "org1")),
|
||||
),
|
||||
),
|
||||
|
@ -353,7 +353,6 @@ func TestCommandSide_AddUserGrant(t *testing.T) {
|
||||
[]string{"rolekey1"},
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(usergrant.NewAddUserGrantUniqueConstraint("org1", "user1", "project1", "")),
|
||||
),
|
||||
),
|
||||
@ -434,7 +433,6 @@ func TestCommandSide_AddUserGrant(t *testing.T) {
|
||||
[]string{"rolekey1"},
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(usergrant.NewAddUserGrantUniqueConstraint("org1", "user1", "project1", "projectgrant1")),
|
||||
),
|
||||
),
|
||||
@ -973,7 +971,6 @@ func TestCommandSide_ChangeUserGrant(t *testing.T) {
|
||||
[]string{"rolekey1", "rolekey2"},
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -1069,7 +1066,6 @@ func TestCommandSide_ChangeUserGrant(t *testing.T) {
|
||||
[]string{"rolekey1", "rolekey2"},
|
||||
)),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -1294,7 +1290,6 @@ func TestCommandSide_DeactivateUserGrant(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -1507,7 +1502,6 @@ func TestCommandSide_ReactivateUserGrant(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -1679,7 +1673,6 @@ func TestCommandSide_RemoveUserGrant(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(usergrant.NewRemoveUserGrantUniqueConstraint("org1", "user1", "project1", "")),
|
||||
),
|
||||
),
|
||||
@ -1720,7 +1713,6 @@ func TestCommandSide_RemoveUserGrant(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(usergrant.NewRemoveUserGrantUniqueConstraint("org1", "user1", "project1", "projectgrant1")),
|
||||
),
|
||||
),
|
||||
@ -1906,7 +1898,6 @@ func TestCommandSide_BulkRemoveUserGrant(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(usergrant.NewRemoveUserGrantUniqueConstraint("org1", "user1", "project1", "")),
|
||||
uniqueConstraintsFromEventConstraint(usergrant.NewRemoveUserGrantUniqueConstraint("org1", "user2", "project2", "")),
|
||||
),
|
||||
@ -1961,7 +1952,6 @@ func TestCommandSide_BulkRemoveUserGrant(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(usergrant.NewRemoveUserGrantUniqueConstraint("org1", "user1", "project1", "projectgrant1")),
|
||||
uniqueConstraintsFromEventConstraint(usergrant.NewRemoveUserGrantUniqueConstraint("org1", "user2", "project2", "projectgrant2")),
|
||||
),
|
||||
|
@ -143,7 +143,6 @@ func TestCommandSide_ChangeHumanAddress(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -194,7 +194,6 @@ func TestCommandSide_ChangeHumanEmail(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -262,7 +261,6 @@ func TestCommandSide_ChangeHumanEmail(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
secretGenerator: GetMockSecretGenerator(t),
|
||||
@ -453,7 +451,6 @@ func TestCommandSide_VerifyHumanEmail(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
secretGenerator: GetMockSecretGenerator(t),
|
||||
@ -509,7 +506,6 @@ func TestCommandSide_VerifyHumanEmail(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
secretGenerator: GetMockSecretGenerator(t),
|
||||
@ -721,7 +717,6 @@ func TestCommandSide_CreateVerificationCodeHumanEmail(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
secretGenerator: GetMockSecretGenerator(t),
|
||||
@ -848,7 +843,6 @@ func TestCommandSide_EmailVerificationCodeSent(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -178,7 +178,6 @@ func TestCommandSide_BulkAddExternalIDPs(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(user.NewAddExternalIDPUniqueConstraint("config1", "externaluser1")),
|
||||
),
|
||||
),
|
||||
@ -228,7 +227,6 @@ func TestCommandSide_BulkAddExternalIDPs(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(user.NewAddExternalIDPUniqueConstraint("config1", "externaluser1")),
|
||||
),
|
||||
),
|
||||
@ -409,7 +407,6 @@ func TestCommandSide_RemoveExternalIDP(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(user.NewRemoveExternalIDPUniqueConstraint("config1", "externaluser1")),
|
||||
),
|
||||
),
|
||||
@ -552,7 +549,6 @@ func TestCommandSide_ExternalLoginCheck(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -148,7 +148,6 @@ func TestCommandSide_ResendInitialMail(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
secretGenerator: GetMockSecretGenerator(t),
|
||||
@ -207,7 +206,6 @@ func TestCommandSide_ResendInitialMail(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
secretGenerator: GetMockSecretGenerator(t),
|
||||
@ -269,7 +267,6 @@ func TestCommandSide_ResendInitialMail(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
secretGenerator: GetMockSecretGenerator(t),
|
||||
@ -454,7 +451,6 @@ func TestCommandSide_VerifyInitCode(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
secretGenerator: GetMockSecretGenerator(t),
|
||||
@ -515,7 +511,6 @@ func TestCommandSide_VerifyInitCode(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
secretGenerator: GetMockSecretGenerator(t),
|
||||
@ -599,7 +594,6 @@ func TestCommandSide_VerifyInitCode(t *testing.T) {
|
||||
false,
|
||||
"")),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
secretGenerator: GetMockSecretGenerator(t),
|
||||
@ -716,7 +710,6 @@ func TestCommandSide_InitCodeSent(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -304,7 +304,6 @@ func TestCommandSide_RemoveHumanOTP(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -125,7 +125,6 @@ func TestCommandSide_SetOneTimePassword(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
userPasswordAlg: crypto.CreateMockHashAlg(gomock.NewController(t)),
|
||||
@ -385,7 +384,6 @@ func TestCommandSide_SetPassword(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
secretGenerator: GetMockSecretGenerator(t),
|
||||
@ -667,7 +665,6 @@ func TestCommandSide_ChangePassword(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
userPasswordAlg: crypto.CreateMockHashAlg(gomock.NewController(t)),
|
||||
@ -853,7 +850,6 @@ func TestCommandSide_RequestSetPassword(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
secretGenerator: GetMockSecretGenerator(t),
|
||||
@ -975,7 +971,6 @@ func TestCommandSide_PasswordCodeSent(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -1157,7 +1152,6 @@ func TestCommandSide_CheckPassword(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
userPasswordAlg: crypto.CreateMockHashAlg(gomock.NewController(t)),
|
||||
@ -1225,7 +1219,6 @@ func TestCommandSide_CheckPassword(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
userPasswordAlg: crypto.CreateMockHashAlg(gomock.NewController(t)),
|
||||
|
@ -163,7 +163,6 @@ func TestCommandSide_ChangeHumanPhone(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -231,7 +230,6 @@ func TestCommandSide_ChangeHumanPhone(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
secretGenerator: GetMockSecretGenerator(t),
|
||||
@ -428,7 +426,6 @@ func TestCommandSide_VerifyHumanPhone(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
secretGenerator: GetMockSecretGenerator(t),
|
||||
@ -490,7 +487,6 @@ func TestCommandSide_VerifyHumanPhone(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
secretGenerator: GetMockSecretGenerator(t),
|
||||
@ -665,7 +661,6 @@ func TestCommandSide_CreateVerificationCodeHumanPhone(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
secretGenerator: GetMockSecretGenerator(t),
|
||||
@ -787,7 +782,6 @@ func TestCommandSide_PhoneVerificationCodeSent(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -933,7 +927,6 @@ func TestCommandSide_RemoveHumanPhone(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -138,7 +138,6 @@ func TestCommandSide_ChangeHumanProfile(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -225,7 +225,6 @@ func TestCommandSide_AddHuman(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(user.NewAddUsernameUniqueConstraint("username", "org1", true)),
|
||||
),
|
||||
),
|
||||
@ -309,7 +308,6 @@ func TestCommandSide_AddHuman(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(user.NewAddUsernameUniqueConstraint("username", "org1", true)),
|
||||
),
|
||||
),
|
||||
@ -389,7 +387,6 @@ func TestCommandSide_AddHuman(t *testing.T) {
|
||||
&user.NewAggregate("user1", "org1").Aggregate),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(user.NewAddUsernameUniqueConstraint("username", "org1", true)),
|
||||
),
|
||||
),
|
||||
@ -489,7 +486,6 @@ func TestCommandSide_AddHuman(t *testing.T) {
|
||||
},
|
||||
time.Hour*1)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(user.NewAddUsernameUniqueConstraint("username", "org1", true)),
|
||||
),
|
||||
),
|
||||
@ -583,7 +579,6 @@ func TestCommandSide_AddHuman(t *testing.T) {
|
||||
&user.NewAggregate("user1", "org1").Aggregate),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(user.NewAddUsernameUniqueConstraint("username", "org1", true)),
|
||||
),
|
||||
),
|
||||
@ -848,7 +843,6 @@ func TestCommandSide_ImportHuman(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(user.NewAddUsernameUniqueConstraint("username", "org1", true)),
|
||||
),
|
||||
),
|
||||
@ -929,7 +923,6 @@ func TestCommandSide_ImportHuman(t *testing.T) {
|
||||
&user.NewAggregate("user1", "org1").Aggregate),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(user.NewAddUsernameUniqueConstraint("username", "org1", true)),
|
||||
),
|
||||
),
|
||||
@ -1030,7 +1023,6 @@ func TestCommandSide_ImportHuman(t *testing.T) {
|
||||
},
|
||||
time.Hour*1)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(user.NewAddUsernameUniqueConstraint("username", "org1", true)),
|
||||
),
|
||||
),
|
||||
@ -1129,7 +1121,6 @@ func TestCommandSide_ImportHuman(t *testing.T) {
|
||||
&user.NewAggregate("user1", "org1").Aggregate),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(user.NewAddUsernameUniqueConstraint("username", "org1", true)),
|
||||
),
|
||||
),
|
||||
@ -1390,7 +1381,6 @@ func TestCommandSide_RegisterHuman(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(user.NewAddUsernameUniqueConstraint("username", "org1", true)),
|
||||
),
|
||||
),
|
||||
@ -1470,7 +1460,6 @@ func TestCommandSide_RegisterHuman(t *testing.T) {
|
||||
&user.NewAggregate("user1", "org1").Aggregate),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(user.NewAddUsernameUniqueConstraint("username", "org1", true)),
|
||||
),
|
||||
),
|
||||
@ -1570,7 +1559,6 @@ func TestCommandSide_RegisterHuman(t *testing.T) {
|
||||
},
|
||||
time.Hour*1)),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(user.NewAddUsernameUniqueConstraint("username", "org1", true)),
|
||||
),
|
||||
),
|
||||
@ -1668,7 +1656,6 @@ func TestCommandSide_RegisterHuman(t *testing.T) {
|
||||
&user.NewAggregate("user1", "org1").Aggregate),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(user.NewAddUsernameUniqueConstraint("username", "org1", true)),
|
||||
),
|
||||
),
|
||||
@ -1827,7 +1814,6 @@ func TestCommandSide_HumanMFASkip(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -1957,7 +1943,6 @@ func TestCommandSide_HumanSignOut(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -2024,7 +2009,6 @@ func TestCommandSide_HumanSignOut(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -128,7 +128,6 @@ func TestCommandSide_AddMachine(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(user.NewAddUsernameUniqueConstraint("username", "org1", true)),
|
||||
),
|
||||
),
|
||||
@ -292,7 +291,6 @@ func TestCommandSide_ChangeMachine(t *testing.T) {
|
||||
newMachineChangedEvent(context.Background(), "user1", "org1", "name1", "description1"),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -257,7 +257,6 @@ func TestCommandSide_UsernameChange(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(user.NewRemoveUsernameUniqueConstraint("username", "org1", true)),
|
||||
uniqueConstraintsFromEventConstraint(user.NewAddUsernameUniqueConstraint("username1", "org1", true)),
|
||||
),
|
||||
@ -415,7 +414,6 @@ func TestCommandSide_DeactivateUser(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -569,7 +567,6 @@ func TestCommandSide_ReactivateUser(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -724,7 +721,6 @@ func TestCommandSide_LockUser(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -878,7 +874,6 @@ func TestCommandSide_UnlockUser(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
@ -1041,7 +1036,6 @@ func TestCommandSide_RemoveUser(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
uniqueConstraintsFromEventConstraint(user.NewRemoveUsernameUniqueConstraint("username", "org1", true)),
|
||||
),
|
||||
),
|
||||
@ -1237,7 +1231,6 @@ func TestCommandSide_UserDomainClaimedSent(t *testing.T) {
|
||||
),
|
||||
),
|
||||
},
|
||||
nil,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
15
internal/domain/asset.go
Normal file
15
internal/domain/asset.go
Normal file
@ -0,0 +1,15 @@
|
||||
package domain
|
||||
|
||||
import "time"
|
||||
|
||||
type AssetInfo struct {
|
||||
Bucket string
|
||||
Key string
|
||||
ETag string
|
||||
Size int64
|
||||
LastModified time.Time
|
||||
Location string
|
||||
VersionID string
|
||||
Expiration time.Time
|
||||
AutheticatedURL string
|
||||
}
|
8
internal/domain/bucket.go
Normal file
8
internal/domain/bucket.go
Normal file
@ -0,0 +1,8 @@
|
||||
package domain
|
||||
|
||||
import "time"
|
||||
|
||||
type BucketInfo struct {
|
||||
Name string
|
||||
CreationDate time.Time
|
||||
}
|
@ -20,8 +20,6 @@ type EventPusher interface {
|
||||
// * struct which can be marshalled to json
|
||||
// * pointer to struct which can be marshalled to json
|
||||
Data() interface{}
|
||||
//Assets contain assets in form of []byte, these will be stored to a separate table
|
||||
Assets() []*Asset
|
||||
//UniqueConstraints should be added for unique attributes of an event, if nil constraints will not be checked
|
||||
UniqueConstraints() []*EventUniqueConstraint
|
||||
}
|
||||
|
@ -39,11 +39,11 @@ func (es *Eventstore) Health(ctx context.Context) error {
|
||||
//PushEvents pushes the events in a single transaction
|
||||
// an event needs at least an aggregate
|
||||
func (es *Eventstore) PushEvents(ctx context.Context, pushEvents ...EventPusher) ([]EventReader, error) {
|
||||
events, assets, constraints, err := eventsToRepository(pushEvents)
|
||||
events, constraints, err := eventsToRepository(pushEvents)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = es.repo.Push(ctx, events, assets, constraints...)
|
||||
err = es.repo.Push(ctx, events, constraints...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -57,12 +57,12 @@ func (es *Eventstore) PushEvents(ctx context.Context, pushEvents ...EventPusher)
|
||||
return eventReaders, nil
|
||||
}
|
||||
|
||||
func eventsToRepository(pushEvents []EventPusher) (events []*repository.Event, assets []*repository.Asset, constraints []*repository.UniqueConstraint, err error) {
|
||||
func eventsToRepository(pushEvents []EventPusher) (events []*repository.Event, constraints []*repository.UniqueConstraint, err error) {
|
||||
events = make([]*repository.Event, len(pushEvents))
|
||||
for i, event := range pushEvents {
|
||||
data, err := EventData(event)
|
||||
if err != nil {
|
||||
return nil, nil, nil, err
|
||||
return nil, nil, err
|
||||
}
|
||||
events[i] = &repository.Event{
|
||||
AggregateID: event.Aggregate().ID,
|
||||
@ -77,12 +77,9 @@ func eventsToRepository(pushEvents []EventPusher) (events []*repository.Event, a
|
||||
if len(event.UniqueConstraints()) > 0 {
|
||||
constraints = append(constraints, uniqueConstraintsToRepository(event.UniqueConstraints())...)
|
||||
}
|
||||
if len(event.Assets()) > 0 {
|
||||
assets = append(assets, assetsToRepository(event.Assets())...)
|
||||
}
|
||||
}
|
||||
|
||||
return events, assets, constraints, nil
|
||||
return events, constraints, nil
|
||||
}
|
||||
|
||||
func uniqueConstraintsToRepository(constraints []*EventUniqueConstraint) (uniqueConstraints []*repository.UniqueConstraint) {
|
||||
|
@ -542,7 +542,7 @@ func TestEventstore_aggregatesToEvents(t *testing.T) {
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
events, _, _, err := eventsToRepository(tt.args.events)
|
||||
events, _, err := eventsToRepository(tt.args.events)
|
||||
if (err != nil) != tt.res.wantErr {
|
||||
t.Errorf("Eventstore.aggregatesToEvents() error = %v, wantErr %v", err, tt.res.wantErr)
|
||||
return
|
||||
@ -575,7 +575,7 @@ func (repo *testRepo) Health(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (repo *testRepo) Push(ctx context.Context, events []*repository.Event, assets []*repository.Asset, uniqueConstraints ...*repository.UniqueConstraint) error {
|
||||
func (repo *testRepo) Push(ctx context.Context, events []*repository.Event, uniqueConstraints ...*repository.UniqueConstraint) error {
|
||||
if repo.err != nil {
|
||||
return repo.err
|
||||
}
|
||||
|
@ -79,10 +79,10 @@ func (mr *MockRepositoryMockRecorder) LatestSequence(arg0, arg1 interface{}) *go
|
||||
}
|
||||
|
||||
// Push mocks base method
|
||||
func (m *MockRepository) Push(arg0 context.Context, arg1 []*repository.Event, arg2 []*repository.Asset, arg3 ...*repository.UniqueConstraint) error {
|
||||
func (m *MockRepository) Push(arg0 context.Context, arg1 []*repository.Event, arg2 ...*repository.UniqueConstraint) error {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1, arg2}
|
||||
for _, a := range arg3 {
|
||||
varargs := []interface{}{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "Push", varargs...)
|
||||
@ -91,8 +91,8 @@ func (m *MockRepository) Push(arg0 context.Context, arg1 []*repository.Event, ar
|
||||
}
|
||||
|
||||
// Push indicates an expected call of Push
|
||||
func (mr *MockRepositoryMockRecorder) Push(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call {
|
||||
func (mr *MockRepositoryMockRecorder) Push(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1, arg2}, arg3...)
|
||||
varargs := append([]interface{}{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Push", reflect.TypeOf((*MockRepository)(nil).Push), varargs...)
|
||||
}
|
||||
|
@ -24,32 +24,28 @@ func (m *MockRepository) ExpectFilterEvents(events ...*repository.Event) *MockRe
|
||||
return m
|
||||
}
|
||||
|
||||
func (m *MockRepository) ExpectPush(expectedEvents []*repository.Event, expectedAssets []*repository.Asset, expectedUniqueConstraints ...*repository.UniqueConstraint) *MockRepository {
|
||||
m.EXPECT().Push(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn(
|
||||
func(ctx context.Context, events []*repository.Event, assets []*repository.Asset, uniqueConstraints ...*repository.UniqueConstraint) error {
|
||||
func (m *MockRepository) ExpectPush(expectedEvents []*repository.Event, expectedUniqueConstraints ...*repository.UniqueConstraint) *MockRepository {
|
||||
m.EXPECT().Push(gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn(
|
||||
func(ctx context.Context, events []*repository.Event, uniqueConstraints ...*repository.UniqueConstraint) error {
|
||||
assert.Equal(m.ctrl.T, expectedEvents, events)
|
||||
if expectedUniqueConstraints == nil {
|
||||
expectedUniqueConstraints = []*repository.UniqueConstraint{}
|
||||
}
|
||||
assert.Equal(m.ctrl.T, expectedUniqueConstraints, uniqueConstraints)
|
||||
|
||||
assert.Equal(m.ctrl.T, expectedAssets, assets)
|
||||
return nil
|
||||
},
|
||||
)
|
||||
return m
|
||||
}
|
||||
|
||||
func (m *MockRepository) ExpectPushFailed(err error, expectedEvents []*repository.Event, expectedAssets []*repository.Asset, expectedUniqueConstraints ...*repository.UniqueConstraint) *MockRepository {
|
||||
m.EXPECT().Push(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn(
|
||||
func(ctx context.Context, events []*repository.Event, assets []*repository.Asset, uniqueConstraints ...*repository.UniqueConstraint) error {
|
||||
func (m *MockRepository) ExpectPushFailed(err error, expectedEvents []*repository.Event, expectedUniqueConstraints ...*repository.UniqueConstraint) *MockRepository {
|
||||
m.EXPECT().Push(gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn(
|
||||
func(ctx context.Context, events []*repository.Event, uniqueConstraints ...*repository.UniqueConstraint) error {
|
||||
assert.Equal(m.ctrl.T, expectedEvents, events)
|
||||
if expectedUniqueConstraints == nil {
|
||||
expectedUniqueConstraints = []*repository.UniqueConstraint{}
|
||||
}
|
||||
assert.Equal(m.ctrl.T, expectedUniqueConstraints, uniqueConstraints)
|
||||
|
||||
assert.Equal(m.ctrl.T, expectedAssets, assets)
|
||||
return err
|
||||
},
|
||||
)
|
||||
|
@ -9,10 +9,9 @@ type Repository interface {
|
||||
//Health checks if the connection to the storage is available
|
||||
Health(ctx context.Context) error
|
||||
// PushEvents adds all events of the given aggregates to the eventstreams of the aggregates.
|
||||
// if assets are pushed, they will be added to the assets table only referenced by id in eventstore (history)
|
||||
// if unique constraints are pushed, they will be added to the unique table for checking unique constraint violations
|
||||
// This call is transaction save. The transaction will be rolled back if one event fails
|
||||
Push(ctx context.Context, events []*Event, assets []*Asset, uniqueConstraints ...*UniqueConstraint) error
|
||||
Push(ctx context.Context, events []*Event, uniqueConstraints ...*UniqueConstraint) error
|
||||
// Filter returns all events matching the given search query
|
||||
Filter(ctx context.Context, searchQuery *SearchQuery) (events []*Event, err error)
|
||||
//LatestSequence returns the latests sequence found by the the search query
|
||||
|
@ -99,17 +99,6 @@ const (
|
||||
)`
|
||||
uniqueDelete = `DELETE FROM eventstore.unique_constraints
|
||||
WHERE unique_type = $1 and unique_field = $2`
|
||||
assetInsert = `INSERT INTO eventstore.assets
|
||||
(
|
||||
id,
|
||||
asset
|
||||
)
|
||||
VALUES (
|
||||
$1,
|
||||
$2
|
||||
)`
|
||||
assetDelete = `DELETE FROM eventstore.assets
|
||||
WHERE id = $1`
|
||||
)
|
||||
|
||||
type CRDB struct {
|
||||
@ -124,7 +113,7 @@ func (db *CRDB) Health(ctx context.Context) error { return db.client.Ping() }
|
||||
|
||||
// Push adds all events to the eventstreams of the aggregates.
|
||||
// This call is transaction save. The transaction will be rolled back if one event fails
|
||||
func (db *CRDB) Push(ctx context.Context, events []*repository.Event, assets []*repository.Asset, uniqueConstraints ...*repository.UniqueConstraint) error {
|
||||
func (db *CRDB) Push(ctx context.Context, events []*repository.Event, uniqueConstraints ...*repository.UniqueConstraint) error {
|
||||
err := crdb.ExecuteTx(ctx, db.client, nil, func(tx *sql.Tx) error {
|
||||
stmt, err := tx.PrepareContext(ctx, crdbInsert)
|
||||
if err != nil {
|
||||
@ -162,11 +151,6 @@ func (db *CRDB) Push(ctx context.Context, events []*repository.Event, assets []*
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = db.handleAssets(ctx, tx, assets...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
})
|
||||
if err != nil && !errors.Is(err, &caos_errs.CaosError{}) {
|
||||
@ -209,32 +193,6 @@ func (db *CRDB) handleUniqueConstraints(ctx context.Context, tx *sql.Tx, uniqueC
|
||||
return nil
|
||||
}
|
||||
|
||||
// handleAssets adds or removes an asset
|
||||
func (db *CRDB) handleAssets(ctx context.Context, tx *sql.Tx, assets ...*repository.Asset) (err error) {
|
||||
if assets == nil || len(assets) == 0 || (len(assets) == 1 && assets[0] == nil) {
|
||||
return nil
|
||||
}
|
||||
|
||||
for _, asset := range assets {
|
||||
if asset.Action == repository.AssetAdded {
|
||||
_, err := tx.ExecContext(ctx, assetInsert, asset.ID, asset.Asset)
|
||||
if err != nil {
|
||||
logging.LogWithFields("SQL-M39fs",
|
||||
"asset-id", asset.ID).WithError(err).Info("insert asset failed")
|
||||
return caos_errs.ThrowInternal(err, "SQL-4M0gs", "unable to create asset")
|
||||
}
|
||||
} else if asset.Action == repository.AssetRemoved {
|
||||
_, err := tx.ExecContext(ctx, assetDelete, asset.ID)
|
||||
if err != nil {
|
||||
logging.LogWithFields("SQL-3M9fs",
|
||||
"asset-id", asset.ID).WithError(err).Info("delete asset failed")
|
||||
return caos_errs.ThrowInternal(err, "SQL-Md9ds", "unable to remove unique constraint ")
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Filter returns all events matching the given search query
|
||||
func (db *CRDB) Filter(ctx context.Context, searchQuery *repository.SearchQuery) (events []*repository.Event, err error) {
|
||||
events = []*repository.Event{}
|
||||
|
@ -270,11 +270,8 @@ func TestCRDB_Push_OneAggregate(t *testing.T) {
|
||||
ctx context.Context
|
||||
events []*repository.Event
|
||||
uniqueConstraints *repository.UniqueConstraint
|
||||
assets *repository.Asset
|
||||
uniqueDataType string
|
||||
uniqueDataField string
|
||||
assetID string
|
||||
asset []byte
|
||||
}
|
||||
type eventsRes struct {
|
||||
pushedEventsCount int
|
||||
@ -388,9 +385,6 @@ func TestCRDB_Push_OneAggregate(t *testing.T) {
|
||||
events: []*repository.Event{
|
||||
generateEvent(t, "12"),
|
||||
},
|
||||
assets: generateAddAsset(t, "asset12", []byte{1}),
|
||||
assetID: "asset12",
|
||||
asset: []byte{1},
|
||||
},
|
||||
res: res{
|
||||
wantErr: false,
|
||||
@ -408,9 +402,6 @@ func TestCRDB_Push_OneAggregate(t *testing.T) {
|
||||
events: []*repository.Event{
|
||||
generateEvent(t, "13"),
|
||||
},
|
||||
assets: generateRemoveAsset(t, "asset13"),
|
||||
assetID: "asset13",
|
||||
asset: []byte{1},
|
||||
},
|
||||
res: res{
|
||||
wantErr: false,
|
||||
@ -434,14 +425,7 @@ func TestCRDB_Push_OneAggregate(t *testing.T) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if tt.args.uniqueDataType != "" && tt.args.uniqueDataField != "" {
|
||||
err := fillAssets(tt.args.assetID, tt.args.asset)
|
||||
if err != nil {
|
||||
t.Error("unable to prefill insert unique data: ", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
if err := db.Push(tt.args.ctx, tt.args.events, []*repository.Asset{tt.args.assets}, tt.args.uniqueConstraints); (err != nil) != tt.res.wantErr {
|
||||
if err := db.Push(tt.args.ctx, tt.args.events, tt.args.uniqueConstraints); (err != nil) != tt.res.wantErr {
|
||||
t.Errorf("CRDB.Push() error = %v, wantErr %v", err, tt.res.wantErr)
|
||||
}
|
||||
|
||||
@ -467,18 +451,6 @@ func TestCRDB_Push_OneAggregate(t *testing.T) {
|
||||
t.Errorf("expected unique count %d got %d", tt.res.eventsRes.uniqueCount, uniqueCount)
|
||||
}
|
||||
}
|
||||
if tt.args.assets != nil {
|
||||
countAssetRow := testCRDBClient.QueryRow("SELECT COUNT(*) FROM eventstore.assets where id = $1", tt.args.assets.ID)
|
||||
var assetCount int
|
||||
err := countAssetRow.Scan(&assetCount)
|
||||
if err != nil {
|
||||
t.Error("unable to query inserted rows: ", err)
|
||||
return
|
||||
}
|
||||
if assetCount != tt.res.eventsRes.assetCount {
|
||||
t.Errorf("expected asset count %d got %d", tt.res.eventsRes.assetCount, assetCount)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -486,7 +458,6 @@ func TestCRDB_Push_OneAggregate(t *testing.T) {
|
||||
func TestCRDB_Push_MultipleAggregate(t *testing.T) {
|
||||
type args struct {
|
||||
events []*repository.Event
|
||||
assets []*repository.Asset
|
||||
}
|
||||
type eventsRes struct {
|
||||
pushedEventsCount int
|
||||
@ -571,7 +542,7 @@ func TestCRDB_Push_MultipleAggregate(t *testing.T) {
|
||||
db := &CRDB{
|
||||
client: testCRDBClient,
|
||||
}
|
||||
if err := db.Push(context.Background(), tt.args.events, tt.args.assets); (err != nil) != tt.res.wantErr {
|
||||
if err := db.Push(context.Background(), tt.args.events); (err != nil) != tt.res.wantErr {
|
||||
t.Errorf("CRDB.Push() error = %v, wantErr %v", err, tt.res.wantErr)
|
||||
}
|
||||
|
||||
@ -762,7 +733,6 @@ func TestCRDB_Filter(t *testing.T) {
|
||||
}
|
||||
type fields struct {
|
||||
existingEvents []*repository.Event
|
||||
assets []*repository.Asset
|
||||
}
|
||||
type res struct {
|
||||
eventCount int
|
||||
@ -828,7 +798,7 @@ func TestCRDB_Filter(t *testing.T) {
|
||||
}
|
||||
|
||||
// setup initial data for query
|
||||
if err := db.Push(context.Background(), tt.fields.existingEvents, tt.fields.assets); err != nil {
|
||||
if err := db.Push(context.Background(), tt.fields.existingEvents); err != nil {
|
||||
t.Errorf("error in setup = %v", err)
|
||||
return
|
||||
}
|
||||
@ -851,7 +821,6 @@ func TestCRDB_LatestSequence(t *testing.T) {
|
||||
}
|
||||
type fields struct {
|
||||
existingEvents []*repository.Event
|
||||
existingAssets []*repository.Asset
|
||||
}
|
||||
type res struct {
|
||||
sequence uint64
|
||||
@ -915,7 +884,7 @@ func TestCRDB_LatestSequence(t *testing.T) {
|
||||
}
|
||||
|
||||
// setup initial data for query
|
||||
if err := db.Push(context.Background(), tt.fields.existingEvents, tt.fields.existingAssets); err != nil {
|
||||
if err := db.Push(context.Background(), tt.fields.existingEvents); err != nil {
|
||||
t.Errorf("error in setup = %v", err)
|
||||
return
|
||||
}
|
||||
@ -935,7 +904,6 @@ func TestCRDB_LatestSequence(t *testing.T) {
|
||||
func TestCRDB_Push_ResourceOwner(t *testing.T) {
|
||||
type args struct {
|
||||
events []*repository.Event
|
||||
assets []*repository.Asset
|
||||
}
|
||||
type res struct {
|
||||
resourceOwners []string
|
||||
@ -1058,7 +1026,7 @@ func TestCRDB_Push_ResourceOwner(t *testing.T) {
|
||||
db := &CRDB{
|
||||
client: testCRDBClient,
|
||||
}
|
||||
if err := db.Push(context.Background(), tt.args.events, tt.args.assets); err != nil {
|
||||
if err := db.Push(context.Background(), tt.args.events); err != nil {
|
||||
t.Errorf("CRDB.Push() error = %v", err)
|
||||
}
|
||||
|
||||
|
@ -522,7 +522,7 @@ func Test_query_events_with_crdb(t *testing.T) {
|
||||
}
|
||||
|
||||
// setup initial data for query
|
||||
if err := db.Push(context.Background(), tt.fields.existingEvents, tt.fields.existingAssets); err != nil {
|
||||
if err := db.Push(context.Background(), tt.fields.existingEvents); err != nil {
|
||||
t.Errorf("error in setup = %v", err)
|
||||
return
|
||||
}
|
||||
|
@ -42,10 +42,6 @@ func (e *FeaturesSetEvent) UniqueConstraints() []*eventstore.EventUniqueConstrai
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *FeaturesSetEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewFeaturesSetEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
changes []FeaturesChanges,
|
||||
|
@ -27,10 +27,6 @@ func (e *ProjectSetEvent) UniqueConstraints() []*eventstore.EventUniqueConstrain
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *ProjectSetEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewIAMProjectSetEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
|
@ -27,10 +27,6 @@ func (e *GlobalOrgSetEvent) UniqueConstraints() []*eventstore.EventUniqueConstra
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *GlobalOrgSetEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewGlobalOrgSetEventEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
|
@ -52,10 +52,6 @@ func (e *SetupStepEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint
|
||||
}
|
||||
}
|
||||
|
||||
func (e *SetupStepEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func SetupStepMapper(event *repository.Event) (eventstore.EventReader, error) {
|
||||
step := &SetupStepEvent{
|
||||
BaseEvent: *eventstore.BaseEventFromRepo(event),
|
||||
|
@ -37,10 +37,6 @@ func (e *MigrateUniqueConstraintEvent) UniqueConstraints() []*eventstore.EventUn
|
||||
return constraints
|
||||
}
|
||||
|
||||
func (e *MigrateUniqueConstraintEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewMigrateUniqueConstraintEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
|
@ -59,10 +59,6 @@ func (e *IDPConfigAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConst
|
||||
return []*eventstore.EventUniqueConstraint{NewAddIDPConfigNameUniqueConstraint(e.Name, e.Aggregate().ResourceOwner)}
|
||||
}
|
||||
|
||||
func (e *IDPConfigAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func IDPConfigAddedEventMapper(event *repository.Event) (eventstore.EventReader, error) {
|
||||
e := &IDPConfigAddedEvent{
|
||||
BaseEvent: *eventstore.BaseEventFromRepo(event),
|
||||
@ -99,10 +95,6 @@ func (e *IDPConfigChangedEvent) UniqueConstraints() []*eventstore.EventUniqueCon
|
||||
}
|
||||
}
|
||||
|
||||
func (e *IDPConfigChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewIDPConfigChangedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
configID,
|
||||
@ -175,10 +167,6 @@ func (e *IDPConfigDeactivatedEvent) UniqueConstraints() []*eventstore.EventUniqu
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *IDPConfigDeactivatedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func IDPConfigDeactivatedEventMapper(event *repository.Event) (eventstore.EventReader, error) {
|
||||
e := &IDPConfigDeactivatedEvent{
|
||||
BaseEvent: *eventstore.BaseEventFromRepo(event),
|
||||
@ -217,10 +205,6 @@ func (e *IDPConfigReactivatedEvent) UniqueConstraints() []*eventstore.EventUniqu
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *IDPConfigReactivatedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func IDPConfigReactivatedEventMapper(event *repository.Event) (eventstore.EventReader, error) {
|
||||
e := &IDPConfigReactivatedEvent{
|
||||
BaseEvent: *eventstore.BaseEventFromRepo(event),
|
||||
@ -262,10 +246,6 @@ func (e *IDPConfigRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueCon
|
||||
return []*eventstore.EventUniqueConstraint{NewRemoveIDPConfigNameUniqueConstraint(e.Name, e.Aggregate().ResourceOwner)}
|
||||
}
|
||||
|
||||
func (e *IDPConfigRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func IDPConfigRemovedEventMapper(event *repository.Event) (eventstore.EventReader, error) {
|
||||
e := &IDPConfigRemovedEvent{
|
||||
BaseEvent: *eventstore.BaseEventFromRepo(event),
|
||||
|
@ -36,10 +36,6 @@ func (e *OIDCConfigAddedEvent) UniqueConstraints() []*eventstore.EventUniqueCons
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *OIDCConfigAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewOIDCConfigAddedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
clientID,
|
||||
@ -98,10 +94,6 @@ func (e *OIDCConfigChangedEvent) UniqueConstraints() []*eventstore.EventUniqueCo
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *OIDCConfigChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewOIDCConfigChangedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
idpConfigID string,
|
||||
|
@ -38,10 +38,6 @@ func (e *AddedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *AddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewAddedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
|
@ -44,10 +44,6 @@ func (e *MemberAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConstrai
|
||||
return []*eventstore.EventUniqueConstraint{NewAddMemberUniqueConstraint(e.Aggregate().ID, e.UserID)}
|
||||
}
|
||||
|
||||
func (e *MemberAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewMemberAddedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
userID string,
|
||||
@ -89,10 +85,6 @@ func (e *MemberChangedEvent) UniqueConstraints() []*eventstore.EventUniqueConstr
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *MemberChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewMemberChangedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
userID string,
|
||||
@ -132,10 +124,6 @@ func (e *MemberRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueConstr
|
||||
return []*eventstore.EventUniqueConstraint{NewRemoveMemberUniqueConstraint(e.Aggregate().ID, e.UserID)}
|
||||
}
|
||||
|
||||
func (e *MemberRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewRemovedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
userID string,
|
||||
|
@ -49,10 +49,6 @@ func (e *DomainAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConstrai
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *DomainAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewDomainAddedEvent(ctx context.Context, aggregate *eventstore.Aggregate, domain string) *DomainAddedEvent {
|
||||
return &DomainAddedEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
@ -92,10 +88,6 @@ func (e *DomainVerificationAddedEvent) UniqueConstraints() []*eventstore.EventUn
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *DomainVerificationAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewDomainVerificationAddedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -140,10 +132,6 @@ func (e *DomainVerificationFailedEvent) UniqueConstraints() []*eventstore.EventU
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *DomainVerificationFailedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewDomainVerificationFailedEvent(ctx context.Context, aggregate *eventstore.Aggregate, domain string) *DomainVerificationFailedEvent {
|
||||
return &DomainVerificationFailedEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
@ -181,10 +169,6 @@ func (e *DomainVerifiedEvent) UniqueConstraints() []*eventstore.EventUniqueConst
|
||||
return []*eventstore.EventUniqueConstraint{NewAddOrgDomainUniqueConstraint(e.Domain)}
|
||||
}
|
||||
|
||||
func (e *DomainVerifiedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewDomainVerifiedEvent(ctx context.Context, aggregate *eventstore.Aggregate, domain string) *DomainVerifiedEvent {
|
||||
return &DomainVerifiedEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
@ -222,10 +206,6 @@ func (e *DomainPrimarySetEvent) UniqueConstraints() []*eventstore.EventUniqueCon
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *DomainPrimarySetEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewDomainPrimarySetEvent(ctx context.Context, aggregate *eventstore.Aggregate, domain string) *DomainPrimarySetEvent {
|
||||
return &DomainPrimarySetEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
@ -267,10 +247,6 @@ func (e *DomainRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueConstr
|
||||
return []*eventstore.EventUniqueConstraint{NewRemoveOrgDomainUniqueConstraint(e.Domain)}
|
||||
}
|
||||
|
||||
func (e *DomainRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewDomainRemovedEvent(ctx context.Context, aggregate *eventstore.Aggregate, domain string, verified bool) *DomainRemovedEvent {
|
||||
return &DomainRemovedEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
|
@ -45,10 +45,6 @@ func (e *OrgAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint
|
||||
return []*eventstore.EventUniqueConstraint{NewAddOrgNameUniqueConstraint(e.Name)}
|
||||
}
|
||||
|
||||
func (e *OrgAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewOrgAddedEvent(ctx context.Context, aggregate *eventstore.Aggregate, name string) *OrgAddedEvent {
|
||||
return &OrgAddedEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
@ -90,10 +86,6 @@ func (e *OrgChangedEvent) UniqueConstraints() []*eventstore.EventUniqueConstrain
|
||||
}
|
||||
}
|
||||
|
||||
func (e *OrgChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewOrgChangedEvent(ctx context.Context, aggregate *eventstore.Aggregate, oldName, newName string) *OrgChangedEvent {
|
||||
return &OrgChangedEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
@ -130,10 +122,6 @@ func (e *OrgDeactivatedEvent) UniqueConstraints() []*eventstore.EventUniqueConst
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *OrgDeactivatedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewOrgDeactivatedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *OrgDeactivatedEvent {
|
||||
return &OrgDeactivatedEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
@ -168,10 +156,6 @@ func (e *OrgReactivatedEvent) UniqueConstraints() []*eventstore.EventUniqueConst
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *OrgReactivatedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewOrgReactivatedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *OrgReactivatedEvent {
|
||||
return &OrgReactivatedEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
@ -207,10 +191,6 @@ func (e *OrgRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueConstrain
|
||||
return []*eventstore.EventUniqueConstraint{NewRemoveOrgNameUniqueConstraint(e.name)}
|
||||
}
|
||||
|
||||
func (e *OrgRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewOrgRemovedEvent(ctx context.Context, aggregate *eventstore.Aggregate, name string) *OrgRemovedEvent {
|
||||
return &OrgRemovedEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
|
@ -30,10 +30,6 @@ func (e *LabelPolicyAddedEvent) UniqueConstraints() []*eventstore.EventUniqueCon
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *LabelPolicyAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewLabelPolicyAddedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
primaryColor,
|
||||
@ -78,10 +74,6 @@ func (e *LabelPolicyChangedEvent) UniqueConstraints() []*eventstore.EventUniqueC
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *LabelPolicyChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewLabelPolicyChangedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
changes []LabelPolicyChanges,
|
||||
@ -143,10 +135,6 @@ func (e *LabelPolicyRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueC
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *LabelPolicyRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewLabelPolicyRemovedEvent(base *eventstore.BaseEvent) *LabelPolicyRemovedEvent {
|
||||
return &LabelPolicyRemovedEvent{
|
||||
BaseEvent: *base,
|
||||
|
@ -33,10 +33,6 @@ func (e *LoginPolicyAddedEvent) UniqueConstraints() []*eventstore.EventUniqueCon
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *LoginPolicyAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewLoginPolicyAddedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
allowUserNamePassword,
|
||||
@ -89,10 +85,6 @@ func (e *LoginPolicyChangedEvent) UniqueConstraints() []*eventstore.EventUniqueC
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *LoginPolicyChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewLoginPolicyChangedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
changes []LoginPolicyChanges,
|
||||
@ -166,10 +158,6 @@ func (e *LoginPolicyRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueC
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *LoginPolicyRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewLoginPolicyRemovedEvent(base *eventstore.BaseEvent) *LoginPolicyRemovedEvent {
|
||||
return &LoginPolicyRemovedEvent{
|
||||
BaseEvent: *base,
|
||||
|
@ -29,10 +29,6 @@ func (e *MailTemplateAddedEvent) UniqueConstraints() []*eventstore.EventUniqueCo
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *MailTemplateAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewMailTemplateAddedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
template []byte,
|
||||
@ -70,10 +66,6 @@ func (e *MailTemplateChangedEvent) UniqueConstraints() []*eventstore.EventUnique
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *MailTemplateChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewMailTemplateChangedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
changes []MailTemplateChanges,
|
||||
@ -123,10 +115,6 @@ func (e *MailTemplateRemovedEvent) UniqueConstraints() []*eventstore.EventUnique
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *MailTemplateRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewMailTemplateRemovedEvent(base *eventstore.BaseEvent) *MailTemplateRemovedEvent {
|
||||
return &MailTemplateRemovedEvent{
|
||||
BaseEvent: *base,
|
||||
|
@ -50,10 +50,6 @@ func (e *MailTextAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConstr
|
||||
return []*eventstore.EventUniqueConstraint{NewAddMailTextUniqueConstraint(e.Aggregate().ResourceOwner, e.MailTextType, e.Language)}
|
||||
}
|
||||
|
||||
func (e *MailTextAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewMailTextAddedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
mailTextType,
|
||||
@ -112,10 +108,6 @@ func (e *MailTextChangedEvent) UniqueConstraints() []*eventstore.EventUniqueCons
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *MailTextChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewMailTextChangedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
mailTextType,
|
||||
@ -202,10 +194,6 @@ func (e *MailTextRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueCons
|
||||
return []*eventstore.EventUniqueConstraint{NewRemoveMailTextUniqueConstraint(e.Aggregate().ResourceOwner, e.MailTextType, e.Language)}
|
||||
}
|
||||
|
||||
func (e *MailTextRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewMailTextRemovedEvent(base *eventstore.BaseEvent, mailTextType, language string) *MailTextRemovedEvent {
|
||||
return &MailTextRemovedEvent{
|
||||
BaseEvent: *base,
|
||||
|
@ -55,10 +55,6 @@ func (e *SecondFactorAddedEvent) UniqueConstraints() []*eventstore.EventUniqueCo
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *SecondFactorAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
type SecondFactorRemovedEvent struct {
|
||||
eventstore.BaseEvent `json:"-"`
|
||||
MFAType domain.SecondFactorType `json:"mfaType"`
|
||||
@ -95,10 +91,6 @@ func (e *SecondFactorRemovedEvent) UniqueConstraints() []*eventstore.EventUnique
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *SecondFactorRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
type MultiFactorAddedEvent struct {
|
||||
eventstore.BaseEvent `json:"-"`
|
||||
|
||||
@ -136,10 +128,6 @@ func (e *MultiFactorAddedEvent) UniqueConstraints() []*eventstore.EventUniqueCon
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *MultiFactorAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
type MultiFactorRemovedEvent struct {
|
||||
eventstore.BaseEvent `json:"-"`
|
||||
MFAType domain.MultiFactorType `json:"mfaType"`
|
||||
@ -175,7 +163,3 @@ func (e *MultiFactorRemovedEvent) Data() interface{} {
|
||||
func (e *MultiFactorRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *MultiFactorRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
@ -30,10 +30,6 @@ func (e *IdentityProviderAddedEvent) UniqueConstraints() []*eventstore.EventUniq
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *IdentityProviderAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewIdentityProviderAddedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
idpConfigID string,
|
||||
@ -74,10 +70,6 @@ func (e *IdentityProviderRemovedEvent) UniqueConstraints() []*eventstore.EventUn
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *IdentityProviderRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewIdentityProviderRemovedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
idpConfigID string,
|
||||
@ -115,10 +107,6 @@ func (e *IdentityProviderCascadeRemovedEvent) UniqueConstraints() []*eventstore.
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *IdentityProviderCascadeRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewIdentityProviderCascadeRemovedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
idpConfigID string,
|
||||
|
@ -28,10 +28,6 @@ func (e *OrgIAMPolicyAddedEvent) UniqueConstraints() []*eventstore.EventUniqueCo
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *OrgIAMPolicyAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewOrgIAMPolicyAddedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
userLoginMustBeDomain bool,
|
||||
@ -70,10 +66,6 @@ func (e *OrgIAMPolicyChangedEvent) UniqueConstraints() []*eventstore.EventUnique
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *OrgIAMPolicyChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewOrgIAMPolicyChangedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
changes []OrgIAMPolicyChanges,
|
||||
@ -123,10 +115,6 @@ func (e *OrgIAMPolicyRemovedEvent) UniqueConstraints() []*eventstore.EventUnique
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *OrgIAMPolicyRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewOrgIAMPolicyRemovedEvent(base *eventstore.BaseEvent) *OrgIAMPolicyRemovedEvent {
|
||||
return &OrgIAMPolicyRemovedEvent{
|
||||
BaseEvent: *base,
|
||||
|
@ -28,10 +28,6 @@ func (e *PasswordAgePolicyAddedEvent) UniqueConstraints() []*eventstore.EventUni
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *PasswordAgePolicyAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewPasswordAgePolicyAddedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
expireWarnDays,
|
||||
@ -73,10 +69,6 @@ func (e *PasswordAgePolicyChangedEvent) UniqueConstraints() []*eventstore.EventU
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *PasswordAgePolicyChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewPasswordAgePolicyChangedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
changes []PasswordAgePolicyChanges,
|
||||
@ -132,10 +124,6 @@ func (e *PasswordAgePolicyRemovedEvent) UniqueConstraints() []*eventstore.EventU
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *PasswordAgePolicyRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewPasswordAgePolicyRemovedEvent(base *eventstore.BaseEvent) *PasswordAgePolicyRemovedEvent {
|
||||
return &PasswordAgePolicyRemovedEvent{
|
||||
BaseEvent: *base,
|
||||
|
@ -32,10 +32,6 @@ func (e *PasswordComplexityPolicyAddedEvent) UniqueConstraints() []*eventstore.E
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *PasswordComplexityPolicyAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewPasswordComplexityPolicyAddedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
minLength uint64,
|
||||
@ -85,10 +81,6 @@ func (e *PasswordComplexityPolicyChangedEvent) UniqueConstraints() []*eventstore
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *PasswordComplexityPolicyChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewPasswordComplexityPolicyChangedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
changes []PasswordComplexityPolicyChanges,
|
||||
@ -162,10 +154,6 @@ func (e *PasswordComplexityPolicyRemovedEvent) UniqueConstraints() []*eventstore
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *PasswordComplexityPolicyRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewPasswordComplexityPolicyRemovedEvent(base *eventstore.BaseEvent) *PasswordComplexityPolicyRemovedEvent {
|
||||
return &PasswordComplexityPolicyRemovedEvent{
|
||||
BaseEvent: *base,
|
||||
|
@ -29,10 +29,6 @@ func (e *PasswordLockoutPolicyAddedEvent) UniqueConstraints() []*eventstore.Even
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *PasswordLockoutPolicyAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewPasswordLockoutPolicyAddedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
maxAttempts uint64,
|
||||
@ -74,10 +70,6 @@ func (e *PasswordLockoutPolicyChangedEvent) UniqueConstraints() []*eventstore.Ev
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *PasswordLockoutPolicyChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewPasswordLockoutPolicyChangedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
changes []PasswordLockoutPolicyChanges,
|
||||
@ -133,10 +125,6 @@ func (e *PasswordLockoutPolicyRemovedEvent) UniqueConstraints() []*eventstore.Ev
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *PasswordLockoutPolicyRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewPasswordLockoutPolicyRemovedEvent(base *eventstore.BaseEvent) *PasswordLockoutPolicyRemovedEvent {
|
||||
return &PasswordLockoutPolicyRemovedEvent{
|
||||
BaseEvent: *base,
|
||||
|
@ -36,10 +36,6 @@ func (e *APIConfigAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConst
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *APIConfigAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewAPIConfigAddedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -90,10 +86,6 @@ func (e *APIConfigChangedEvent) UniqueConstraints() []*eventstore.EventUniqueCon
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *APIConfigChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewAPIConfigChangedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -154,10 +146,6 @@ func (e *APIConfigSecretChangedEvent) UniqueConstraints() []*eventstore.EventUni
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *APIConfigSecretChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewAPIConfigSecretChangedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -202,10 +190,6 @@ func (e *APIConfigSecretCheckSucceededEvent) UniqueConstraints() []*eventstore.E
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *APIConfigSecretCheckSucceededEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewAPIConfigSecretCheckSucceededEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -248,10 +232,6 @@ func (e *APIConfigSecretCheckFailedEvent) UniqueConstraints() []*eventstore.Even
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *APIConfigSecretCheckFailedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewAPIConfigSecretCheckFailedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
|
@ -48,10 +48,6 @@ func (e *ApplicationAddedEvent) UniqueConstraints() []*eventstore.EventUniqueCon
|
||||
return []*eventstore.EventUniqueConstraint{NewAddApplicationUniqueConstraint(e.Name, e.Aggregate().ID)}
|
||||
}
|
||||
|
||||
func (e *ApplicationAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewApplicationAddedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -101,10 +97,6 @@ func (e *ApplicationChangedEvent) UniqueConstraints() []*eventstore.EventUniqueC
|
||||
}
|
||||
}
|
||||
|
||||
func (e *ApplicationChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewApplicationChangedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -151,10 +143,6 @@ func (e *ApplicationDeactivatedEvent) UniqueConstraints() []*eventstore.EventUni
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *ApplicationDeactivatedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewApplicationDeactivatedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -197,10 +185,6 @@ func (e *ApplicationReactivatedEvent) UniqueConstraints() []*eventstore.EventUni
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *ApplicationReactivatedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewApplicationReactivatedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -244,10 +228,6 @@ func (e *ApplicationRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueC
|
||||
return []*eventstore.EventUniqueConstraint{NewRemoveApplicationUniqueConstraint(e.name, e.Aggregate().ID)}
|
||||
}
|
||||
|
||||
func (e *ApplicationRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewApplicationRemovedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
|
@ -50,10 +50,6 @@ func (e *GrantAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConstrain
|
||||
return []*eventstore.EventUniqueConstraint{NewAddProjectGrantUniqueConstraint(e.GrantedOrgID, e.Aggregate().ID)}
|
||||
}
|
||||
|
||||
func (e *GrantAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewGrantAddedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -101,10 +97,6 @@ func (e *GrantChangedEvent) UniqueConstraints() []*eventstore.EventUniqueConstra
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *GrantChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewGrantChangedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -150,10 +142,6 @@ func (e *GrantCascadeChangedEvent) UniqueConstraints() []*eventstore.EventUnique
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *GrantCascadeChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewGrantCascadeChangedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -198,10 +186,6 @@ func (e *GrantDeactivateEvent) UniqueConstraints() []*eventstore.EventUniqueCons
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *GrantDeactivateEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewGrantDeactivateEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -244,10 +228,6 @@ func (e *GrantReactivatedEvent) UniqueConstraints() []*eventstore.EventUniqueCon
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *GrantReactivatedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewGrantReactivatedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -291,10 +271,6 @@ func (e *GrantRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueConstra
|
||||
return []*eventstore.EventUniqueConstraint{NewRemoveProjectGrantUniqueConstraint(e.grantedOrgID, e.Aggregate().ID)}
|
||||
}
|
||||
|
||||
func (e *GrantRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewGrantRemovedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
|
@ -48,10 +48,6 @@ func (e *GrantMemberAddedEvent) UniqueConstraints() []*eventstore.EventUniqueCon
|
||||
return []*eventstore.EventUniqueConstraint{NewAddProjectGrantMemberUniqueConstraint(e.Aggregate().ID, e.UserID, e.GrantID)}
|
||||
}
|
||||
|
||||
func (e *GrantMemberAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewProjectGrantMemberAddedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -100,10 +96,6 @@ func (e *GrantMemberChangedEvent) UniqueConstraints() []*eventstore.EventUniqueC
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *GrantMemberChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewProjectGrantMemberChangedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -151,10 +143,6 @@ func (e *GrantMemberRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueC
|
||||
return []*eventstore.EventUniqueConstraint{NewRemoveProjectGrantMemberUniqueConstraint(e.Aggregate().ID, e.UserID, e.GrantID)}
|
||||
}
|
||||
|
||||
func (e *GrantMemberRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewProjectGrantMemberRemovedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
|
@ -36,10 +36,6 @@ func (e *ApplicationKeyAddedEvent) UniqueConstraints() []*eventstore.EventUnique
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *ApplicationKeyAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewApplicationKeyAddedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -92,10 +88,6 @@ func (e *ApplicationKeyRemovedEvent) UniqueConstraints() []*eventstore.EventUniq
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *ApplicationKeyRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewApplicationKeyRemovedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
|
@ -49,10 +49,6 @@ func (e *OIDCConfigAddedEvent) UniqueConstraints() []*eventstore.EventUniqueCons
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *OIDCConfigAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewOIDCConfigAddedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -138,10 +134,6 @@ func (e *OIDCConfigChangedEvent) UniqueConstraints() []*eventstore.EventUniqueCo
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *OIDCConfigChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewOIDCConfigChangedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -274,10 +266,6 @@ func (e *OIDCConfigSecretChangedEvent) UniqueConstraints() []*eventstore.EventUn
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *OIDCConfigSecretChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewOIDCConfigSecretChangedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -322,10 +310,6 @@ func (e *OIDCConfigSecretCheckSucceededEvent) UniqueConstraints() []*eventstore.
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *OIDCConfigSecretCheckSucceededEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewOIDCConfigSecretCheckSucceededEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -368,10 +352,6 @@ func (e *OIDCConfigSecretCheckFailedEvent) UniqueConstraints() []*eventstore.Eve
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *OIDCConfigSecretCheckFailedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewOIDCConfigSecretCheckFailedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
|
@ -48,10 +48,6 @@ func (e *ProjectAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConstra
|
||||
return []*eventstore.EventUniqueConstraint{NewAddProjectNameUniqueConstraint(e.Name, e.Aggregate().ResourceOwner)}
|
||||
}
|
||||
|
||||
func (e *ProjectAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewProjectAddedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -103,10 +99,6 @@ func (e *ProjectChangeEvent) UniqueConstraints() []*eventstore.EventUniqueConstr
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *ProjectChangeEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewProjectChangeEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -175,10 +167,6 @@ func (e *ProjectDeactivatedEvent) UniqueConstraints() []*eventstore.EventUniqueC
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *ProjectDeactivatedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewProjectDeactivatedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *ProjectDeactivatedEvent {
|
||||
return &ProjectDeactivatedEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
@ -207,10 +195,6 @@ func (e *ProjectReactivatedEvent) UniqueConstraints() []*eventstore.EventUniqueC
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *ProjectReactivatedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewProjectReactivatedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *ProjectReactivatedEvent {
|
||||
return &ProjectReactivatedEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
@ -241,10 +225,6 @@ func (e *ProjectRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueConst
|
||||
return []*eventstore.EventUniqueConstraint{NewRemoveProjectNameUniqueConstraint(e.Name, e.Aggregate().ResourceOwner)}
|
||||
}
|
||||
|
||||
func (e *ProjectRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewProjectRemovedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
|
@ -47,10 +47,6 @@ func (e *RoleAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint
|
||||
return []*eventstore.EventUniqueConstraint{NewAddProjectRoleUniqueConstraint(e.Key, e.Aggregate().ID)}
|
||||
}
|
||||
|
||||
func (e *RoleAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewRoleAddedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -99,10 +95,6 @@ func (e *RoleChangedEvent) UniqueConstraints() []*eventstore.EventUniqueConstrai
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *RoleChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewRoleChangedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -172,10 +164,6 @@ func (e *RoleRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueConstrai
|
||||
return []*eventstore.EventUniqueConstraint{NewRemoveProjectRoleUniqueConstraint(e.Key, e.Aggregate().ID)}
|
||||
}
|
||||
|
||||
func (e *RoleRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewRoleRemovedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
|
@ -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,
|
||||
|
@ -32,10 +32,6 @@ func (e *HumanAddressChangedEvent) UniqueConstraints() []*eventstore.EventUnique
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanAddressChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewAddressChangedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
|
@ -34,10 +34,6 @@ func (e *HumanEmailChangedEvent) UniqueConstraints() []*eventstore.EventUniqueCo
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanEmailChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanEmailChangedEvent(ctx context.Context, aggregate *eventstore.Aggregate, emailAddress string) *HumanEmailChangedEvent {
|
||||
return &HumanEmailChangedEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
@ -75,10 +71,6 @@ func (e *HumanEmailVerifiedEvent) UniqueConstraints() []*eventstore.EventUniqueC
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanEmailVerifiedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanEmailVerifiedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *HumanEmailVerifiedEvent {
|
||||
return &HumanEmailVerifiedEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
@ -109,10 +101,6 @@ func (e *HumanEmailVerificationFailedEvent) UniqueConstraints() []*eventstore.Ev
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanEmailVerificationFailedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanEmailVerificationFailedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *HumanEmailVerificationFailedEvent {
|
||||
return &HumanEmailVerificationFailedEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
@ -144,10 +132,6 @@ func (e *HumanEmailCodeAddedEvent) UniqueConstraints() []*eventstore.EventUnique
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanEmailCodeAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanEmailCodeAddedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -188,10 +172,6 @@ func (e *HumanEmailCodeSentEvent) UniqueConstraints() []*eventstore.EventUniqueC
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanEmailCodeSentEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanEmailCodeSentEvent(ctx context.Context, aggregate *eventstore.Aggregate) *HumanEmailCodeSentEvent {
|
||||
return &HumanEmailCodeSentEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
|
@ -50,10 +50,6 @@ func (e *HumanExternalIDPAddedEvent) UniqueConstraints() []*eventstore.EventUniq
|
||||
return []*eventstore.EventUniqueConstraint{NewAddExternalIDPUniqueConstraint(e.IDPConfigID, e.ExternalUserID)}
|
||||
}
|
||||
|
||||
func (e *HumanExternalIDPAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanExternalIDPAddedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -101,10 +97,6 @@ func (e *HumanExternalIDPRemovedEvent) UniqueConstraints() []*eventstore.EventUn
|
||||
return []*eventstore.EventUniqueConstraint{NewRemoveExternalIDPUniqueConstraint(e.IDPConfigID, e.ExternalUserID)}
|
||||
}
|
||||
|
||||
func (e *HumanExternalIDPRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanExternalIDPRemovedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -150,10 +142,6 @@ func (e *HumanExternalIDPCascadeRemovedEvent) UniqueConstraints() []*eventstore.
|
||||
return []*eventstore.EventUniqueConstraint{NewRemoveExternalIDPUniqueConstraint(e.IDPConfigID, e.ExternalUserID)}
|
||||
}
|
||||
|
||||
func (e *HumanExternalIDPCascadeRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanExternalIDPCascadeRemovedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -197,10 +185,6 @@ func (e *HumanExternalIDPCheckSucceededEvent) UniqueConstraints() []*eventstore.
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanExternalIDPCheckSucceededEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanExternalIDPCheckSucceededEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
|
@ -24,10 +24,6 @@ func (e *HumanMFAInitSkippedEvent) UniqueConstraints() []*eventstore.EventUnique
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanMFAInitSkippedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanMFAInitSkippedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *HumanMFAInitSkippedEvent {
|
||||
return &HumanMFAInitSkippedEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
|
@ -33,10 +33,6 @@ func (e *HumanOTPAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConstr
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanOTPAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanOTPAddedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -76,10 +72,6 @@ func (e *HumanOTPVerifiedEvent) UniqueConstraints() []*eventstore.EventUniqueCon
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanOTPVerifiedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanOTPVerifiedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -113,10 +105,6 @@ func (e *HumanOTPRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueCons
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanOTPRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanOTPRemovedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -149,10 +137,6 @@ func (e *HumanOTPCheckSucceededEvent) UniqueConstraints() []*eventstore.EventUni
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanOTPCheckSucceededEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanOTPCheckSucceededEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -192,10 +176,6 @@ func (e *HumanOTPCheckFailedEvent) UniqueConstraints() []*eventstore.EventUnique
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanOTPCheckFailedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanOTPCheckFailedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
|
@ -24,10 +24,6 @@ func (e *HumanWebAuthNAddedEvent) UniqueConstraints() []*eventstore.EventUniqueC
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanWebAuthNAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanWebAuthNAddedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
webAuthNTokenID,
|
||||
@ -72,10 +68,6 @@ func (e *HumanWebAuthNVerifiedEvent) UniqueConstraints() []*eventstore.EventUniq
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanWebAuthNVerifiedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanWebAuthNVerifiedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
webAuthNTokenID,
|
||||
@ -126,10 +118,6 @@ func (e *HumanWebAuthNSignCountChangedEvent) UniqueConstraints() []*eventstore.E
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanWebAuthNSignCountChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanWebAuthNSignCountChangedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
webAuthNTokenID string,
|
||||
@ -168,10 +156,6 @@ func (e *HumanWebAuthNRemovedEvent) UniqueConstraints() []*eventstore.EventUniqu
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanWebAuthNRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanWebAuthNRemovedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
webAuthNTokenID string,
|
||||
@ -210,10 +194,6 @@ func (e *HumanWebAuthNBeginLoginEvent) UniqueConstraints() []*eventstore.EventUn
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanWebAuthNBeginLoginEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanWebAuthNBeginLoginEvent(base *eventstore.BaseEvent, challenge string, allowedCredentialIDs [][]byte, userVerification domain.UserVerificationRequirement, info *AuthRequestInfo) *HumanWebAuthNBeginLoginEvent {
|
||||
return &HumanWebAuthNBeginLoginEvent{
|
||||
BaseEvent: *base,
|
||||
@ -248,10 +228,6 @@ func (e *HumanWebAuthNCheckSucceededEvent) UniqueConstraints() []*eventstore.Eve
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanWebAuthNCheckSucceededEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanWebAuthNCheckSucceededEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
info *AuthRequestInfo) *HumanWebAuthNCheckSucceededEvent {
|
||||
@ -285,10 +261,6 @@ func (e *HumanWebAuthNCheckFailedEvent) UniqueConstraints() []*eventstore.EventU
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanWebAuthNCheckFailedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanWebAuthNCheckFailedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
info *AuthRequestInfo) *HumanWebAuthNCheckFailedEvent {
|
||||
|
@ -37,10 +37,6 @@ func (e *HumanPasswordChangedEvent) UniqueConstraints() []*eventstore.EventUniqu
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanPasswordChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanPasswordChangedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -88,10 +84,6 @@ func (e *HumanPasswordCodeAddedEvent) UniqueConstraints() []*eventstore.EventUni
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanPasswordCodeAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanPasswordCodeAddedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -135,10 +127,6 @@ func (e *HumanPasswordCodeSentEvent) UniqueConstraints() []*eventstore.EventUniq
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanPasswordCodeSentEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanPasswordCodeSentEvent(ctx context.Context, aggregate *eventstore.Aggregate) *HumanPasswordCodeSentEvent {
|
||||
return &HumanPasswordCodeSentEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
@ -168,10 +156,6 @@ func (e *HumanPasswordCheckSucceededEvent) UniqueConstraints() []*eventstore.Eve
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanPasswordCheckSucceededEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanPasswordCheckSucceededEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -212,10 +196,6 @@ func (e *HumanPasswordCheckFailedEvent) UniqueConstraints() []*eventstore.EventU
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanPasswordCheckFailedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanPasswordCheckFailedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
|
@ -35,10 +35,6 @@ func (e *HumanPhoneChangedEvent) UniqueConstraints() []*eventstore.EventUniqueCo
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanPhoneChangedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanPhoneChangedEvent(ctx context.Context, aggregate *eventstore.Aggregate, phone string) *HumanPhoneChangedEvent {
|
||||
return &HumanPhoneChangedEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
@ -74,10 +70,6 @@ func (e *HumanPhoneRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueCo
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanPhoneRemovedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanPhoneRemovedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *HumanPhoneRemovedEvent {
|
||||
return &HumanPhoneRemovedEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
@ -108,10 +100,6 @@ func (e *HumanPhoneVerifiedEvent) UniqueConstraints() []*eventstore.EventUniqueC
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanPhoneVerifiedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanPhoneVerifiedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *HumanPhoneVerifiedEvent {
|
||||
return &HumanPhoneVerifiedEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
@ -141,10 +129,6 @@ func (e *HumanPhoneVerificationFailedEvent) UniqueConstraints() []*eventstore.Ev
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanPhoneVerificationFailedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanPhoneVerificationFailedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *HumanPhoneVerificationFailedEvent {
|
||||
return &HumanPhoneVerificationFailedEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
@ -176,10 +160,6 @@ func (e *HumanPhoneCodeAddedEvent) UniqueConstraints() []*eventstore.EventUnique
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanPhoneCodeAddedEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanPhoneCodeAddedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
@ -221,10 +201,6 @@ func (e *HumanPhoneCodeSentEvent) UniqueConstraints() []*eventstore.EventUniqueC
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *HumanPhoneCodeSentEvent) Assets() []*eventstore.Asset {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHumanPhoneCodeSentEvent(ctx context.Context, aggregate *eventstore.Aggregate) *HumanPhoneCodeSentEvent {
|
||||
return &HumanPhoneCodeSentEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user