mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-15 20:38:00 +00:00
42 lines
829 B
Go
42 lines
829 B
Go
|
package action
|
||
|
|
||
|
import "github.com/zitadel/zitadel/internal/api/grpc/server/middleware"
|
||
|
|
||
|
func (f *Flow) Localizers() []middleware.Localizer {
|
||
|
if f == nil {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
localizers := make([]middleware.Localizer, 0, len(f.TriggerActions)+1)
|
||
|
localizers = append(localizers, f.Type.Localizers()...)
|
||
|
for _, action := range f.TriggerActions {
|
||
|
localizers = append(localizers, action.Localizers()...)
|
||
|
}
|
||
|
|
||
|
return localizers
|
||
|
}
|
||
|
|
||
|
func (t *FlowType) Localizers() []middleware.Localizer {
|
||
|
if t == nil {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
return []middleware.Localizer{t.Name}
|
||
|
}
|
||
|
|
||
|
func (t *TriggerType) Localizers() []middleware.Localizer {
|
||
|
if t == nil {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
return []middleware.Localizer{t.Name}
|
||
|
}
|
||
|
|
||
|
func (ta *TriggerAction) Localizers() []middleware.Localizer {
|
||
|
if ta == nil {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
return ta.TriggerType.Localizers()
|
||
|
}
|