fix(query): realtime data on defined requests (#3726)

* feat: directly specify factors on addCustomLoginPolicy and return on LoginPolicy responses

* fix proto

* update login policy

* feat: directly specify idp on addCustomLoginPolicy and return on LoginPolicy responses

* fix: tests

* fix(projection): trigger bulk

* refactor: clean projection pkg

* instance should bulk

* fix(query): should trigger bulk on id calls

* tests

* build prerelease

* fix: add shouldTriggerBulk

* fix: test

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
Co-authored-by: Max Peintner <max@caos.ch>
This commit is contained in:
Silvan
2022-06-14 07:51:00 +02:00
committed by GitHub
parent 5c805c48db
commit dd2f31683c
146 changed files with 1097 additions and 1239 deletions

View File

@@ -27,12 +27,12 @@ const (
DebugNotificationProviderCompactCol = "compact"
)
type DebugNotificationProviderProjection struct {
type debugNotificationProviderProjection struct {
crdb.StatementHandler
}
func NewDebugNotificationProviderProjection(ctx context.Context, config crdb.StatementHandlerConfig) *DebugNotificationProviderProjection {
p := &DebugNotificationProviderProjection{}
func newDebugNotificationProviderProjection(ctx context.Context, config crdb.StatementHandlerConfig) *debugNotificationProviderProjection {
p := &debugNotificationProviderProjection{}
config.ProjectionName = DebugNotificationProviderTable
config.Reducers = p.reducers()
config.InitCheck = crdb.NewTableCheck(
@@ -54,7 +54,7 @@ func NewDebugNotificationProviderProjection(ctx context.Context, config crdb.Sta
return p
}
func (p *DebugNotificationProviderProjection) reducers() []handler.AggregateReducer {
func (p *debugNotificationProviderProjection) reducers() []handler.AggregateReducer {
return []handler.AggregateReducer{
{
Aggregate: instance.AggregateType,
@@ -88,7 +88,7 @@ func (p *DebugNotificationProviderProjection) reducers() []handler.AggregateRedu
}
}
func (p *DebugNotificationProviderProjection) reduceDebugNotificationProviderAdded(event eventstore.Event) (*handler.Statement, error) {
func (p *debugNotificationProviderProjection) reduceDebugNotificationProviderAdded(event eventstore.Event) (*handler.Statement, error) {
var providerEvent settings.DebugNotificationProviderAddedEvent
var providerType domain.NotificationProviderType
switch e := event.(type) {
@@ -115,7 +115,7 @@ func (p *DebugNotificationProviderProjection) reduceDebugNotificationProviderAdd
}), nil
}
func (p *DebugNotificationProviderProjection) reduceDebugNotificationProviderChanged(event eventstore.Event) (*handler.Statement, error) {
func (p *debugNotificationProviderProjection) reduceDebugNotificationProviderChanged(event eventstore.Event) (*handler.Statement, error) {
var providerEvent settings.DebugNotificationProviderChangedEvent
var providerType domain.NotificationProviderType
switch e := event.(type) {
@@ -147,7 +147,7 @@ func (p *DebugNotificationProviderProjection) reduceDebugNotificationProviderCha
), nil
}
func (p *DebugNotificationProviderProjection) reduceDebugNotificationProviderRemoved(event eventstore.Event) (*handler.Statement, error) {
func (p *debugNotificationProviderProjection) reduceDebugNotificationProviderRemoved(event eventstore.Event) (*handler.Statement, error) {
var providerEvent settings.DebugNotificationProviderRemovedEvent
var providerType domain.NotificationProviderType
switch e := event.(type) {