mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 01:37:31 +00:00
feat: handle instanceID in projections (#3442)
* feat: handle instanceID in projections * rename functions * fix key lock * fix import
This commit is contained in:
@@ -11,8 +11,8 @@ const (
|
||||
stylingTyble = "adminapi.styling"
|
||||
)
|
||||
|
||||
func (v *View) StylingByAggregateIDAndState(aggregateID string, state int32) (*model.LabelPolicyView, error) {
|
||||
return view.GetStylingByAggregateIDAndState(v.Db, stylingTyble, aggregateID, state)
|
||||
func (v *View) StylingByAggregateIDAndState(aggregateID, instanceID string, state int32) (*model.LabelPolicyView, error) {
|
||||
return view.GetStylingByAggregateIDAndState(v.Db, stylingTyble, aggregateID, instanceID, state)
|
||||
}
|
||||
|
||||
func (v *View) PutStyling(policy *model.LabelPolicyView, event *models.Event) error {
|
||||
@@ -23,8 +23,12 @@ func (v *View) PutStyling(policy *model.LabelPolicyView, event *models.Event) er
|
||||
return v.ProcessedStylingSequence(event)
|
||||
}
|
||||
|
||||
func (v *View) GetLatestStylingSequence() (*global_view.CurrentSequence, error) {
|
||||
return v.latestSequence(stylingTyble)
|
||||
func (v *View) GetLatestStylingSequence(instanceID string) (*global_view.CurrentSequence, error) {
|
||||
return v.latestSequence(stylingTyble, instanceID)
|
||||
}
|
||||
|
||||
func (v *View) GetLatestStylingSequences() ([]*global_view.CurrentSequence, error) {
|
||||
return v.latestSequences(stylingTyble)
|
||||
}
|
||||
|
||||
func (v *View) ProcessedStylingSequence(event *models.Event) error {
|
||||
@@ -35,8 +39,8 @@ func (v *View) UpdateStylingSpoolerRunTimestamp() error {
|
||||
return v.updateSpoolerRunSequence(stylingTyble)
|
||||
}
|
||||
|
||||
func (v *View) GetLatestStylingFailedEvent(sequence uint64) (*global_view.FailedEvent, error) {
|
||||
return v.latestFailedEvent(stylingTyble, sequence)
|
||||
func (v *View) GetLatestStylingFailedEvent(sequence uint64, instanceID string) (*global_view.FailedEvent, error) {
|
||||
return v.latestFailedEvent(stylingTyble, instanceID, sequence)
|
||||
}
|
||||
|
||||
func (v *View) ProcessedStylingFailedEvent(failedEvent *global_view.FailedEvent) error {
|
||||
|
Reference in New Issue
Block a user