2021-02-23 08:32:00 +01:00
|
|
|
package view
|
|
|
|
|
|
|
|
import (
|
2021-02-23 15:13:04 +01:00
|
|
|
"github.com/caos/zitadel/internal/eventstore"
|
2021-03-10 14:32:56 +01:00
|
|
|
"github.com/caos/zitadel/internal/repository/keypair"
|
2021-02-23 08:32:00 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
func KeyPairQuery(latestSequence uint64) *eventstore.SearchQueryBuilder {
|
2021-07-06 13:55:57 +02:00
|
|
|
return eventstore.NewSearchQueryBuilder(eventstore.ColumnsEvent).
|
|
|
|
AddQuery().
|
2021-08-11 07:55:16 +02:00
|
|
|
AggregateTypes(keypair.AggregateType).
|
2021-03-10 14:32:56 +01:00
|
|
|
SequenceGreater(latestSequence).
|
2021-07-06 13:55:57 +02:00
|
|
|
EventTypes(keypair.AddedEventType).
|
|
|
|
Builder()
|
2021-02-23 08:32:00 +01:00
|
|
|
}
|