2021-03-19 18:46:26 +01:00
|
|
|
package management
|
|
|
|
|
2021-03-22 14:40:25 +01:00
|
|
|
import (
|
|
|
|
"github.com/caos/zitadel/internal/api/grpc/server/middleware"
|
|
|
|
)
|
|
|
|
|
|
|
|
func (a *ListAppsResponse) Localizers() []middleware.Localizer {
|
|
|
|
if a == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
localizers := make([]middleware.Localizer, 0)
|
|
|
|
for _, a := range a.Result {
|
|
|
|
localizers = append(localizers, a.Localizers()...)
|
|
|
|
}
|
|
|
|
return localizers
|
|
|
|
}
|
|
|
|
|
|
|
|
func (a *GetAppByIDResponse) Localizers() []middleware.Localizer {
|
|
|
|
if a == nil || (a != nil && a.App == nil) {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return a.App.Localizers()
|
|
|
|
}
|
2021-03-19 18:46:26 +01:00
|
|
|
|
|
|
|
func (a *AddOIDCAppResponse) Localizers() []middleware.Localizer {
|
|
|
|
if a == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
if !a.NoneCompliant {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
localizers := make([]middleware.Localizer, len(a.ComplianceProblems))
|
|
|
|
for i, problem := range a.ComplianceProblems {
|
|
|
|
localizers[i] = problem
|
|
|
|
}
|
|
|
|
return localizers
|
|
|
|
|
|
|
|
}
|