mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 13:37:35 +00:00
chore: move the go code into a subfolder
This commit is contained in:
37
apps/api/pkg/grpc/management/action.go
Normal file
37
apps/api/pkg/grpc/management/action.go
Normal file
@@ -0,0 +1,37 @@
|
||||
package management
|
||||
|
||||
import "github.com/zitadel/zitadel/internal/api/grpc/server/middleware"
|
||||
|
||||
func (r *ListFlowTypesResponse) Localizers() (localizers []middleware.Localizer) {
|
||||
if r == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
localizers = make([]middleware.Localizer, 0, len(r.Result))
|
||||
for _, typ := range r.Result {
|
||||
localizers = append(localizers, typ.Localizers()...)
|
||||
}
|
||||
|
||||
return localizers
|
||||
}
|
||||
|
||||
func (r *ListFlowTriggerTypesResponse) Localizers() (localizers []middleware.Localizer) {
|
||||
if r == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
localizers = make([]middleware.Localizer, 0, len(r.Result))
|
||||
for _, typ := range r.Result {
|
||||
localizers = append(localizers, typ.Localizers()...)
|
||||
}
|
||||
|
||||
return localizers
|
||||
}
|
||||
|
||||
func (r *GetFlowResponse) Localizers() []middleware.Localizer {
|
||||
if r == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return r.Flow.Localizers()
|
||||
}
|
41
apps/api/pkg/grpc/management/app.go
Normal file
41
apps/api/pkg/grpc/management/app.go
Normal file
@@ -0,0 +1,41 @@
|
||||
package management
|
||||
|
||||
import (
|
||||
"github.com/zitadel/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()
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
}
|
49
apps/api/pkg/grpc/management/changes.go
Normal file
49
apps/api/pkg/grpc/management/changes.go
Normal file
@@ -0,0 +1,49 @@
|
||||
package management
|
||||
|
||||
import (
|
||||
"github.com/zitadel/zitadel/internal/api/grpc/server/middleware"
|
||||
"github.com/zitadel/zitadel/pkg/grpc/change"
|
||||
)
|
||||
|
||||
func (c *ListUserChangesResponse) Localizers() []middleware.Localizer {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return changesLocalizers(c.Result)
|
||||
}
|
||||
|
||||
func (c *ListOrgChangesResponse) Localizers() []middleware.Localizer {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return changesLocalizers(c.Result)
|
||||
}
|
||||
|
||||
func (c *ListProjectChangesResponse) Localizers() []middleware.Localizer {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return changesLocalizers(c.Result)
|
||||
}
|
||||
|
||||
func (c *ListProjectGrantChangesResponse) Localizers() []middleware.Localizer {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return changesLocalizers(c.Result)
|
||||
}
|
||||
|
||||
func (c *ListAppChangesResponse) Localizers() []middleware.Localizer {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return changesLocalizers(c.Result)
|
||||
}
|
||||
|
||||
func changesLocalizers(changes []*change.Change) []middleware.Localizer {
|
||||
localizers := make([]middleware.Localizer, len(changes))
|
||||
for i, change := range changes {
|
||||
localizers[i] = change.EventType
|
||||
}
|
||||
return localizers
|
||||
}
|
5
apps/api/pkg/grpc/management/oneof.go
Normal file
5
apps/api/pkg/grpc/management/oneof.go
Normal file
@@ -0,0 +1,5 @@
|
||||
package management
|
||||
|
||||
//AppConfig is a type alias of the generated isApplication_AppConfig config
|
||||
//to make it public
|
||||
// type AppConfig = isApplication_AppConfig
|
Reference in New Issue
Block a user