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