package app import ( "net/http" "connectrpc.com/connect" "google.golang.org/protobuf/reflect/protoreflect" "github.com/zitadel/zitadel/internal/api/authz" "github.com/zitadel/zitadel/internal/command" "github.com/zitadel/zitadel/internal/config/systemdefaults" "github.com/zitadel/zitadel/internal/domain" "github.com/zitadel/zitadel/internal/query" "github.com/zitadel/zitadel/pkg/grpc/application/v2" "github.com/zitadel/zitadel/pkg/grpc/application/v2/applicationconnect" ) var _ applicationconnect.ApplicationServiceHandler = (*Server)(nil) type Server struct { command *command.Commands query *query.Queries systemDefaults systemdefaults.SystemDefaults checkPermission domain.PermissionCheck } func CreateServer( systemDefaults systemdefaults.SystemDefaults, command *command.Commands, query *query.Queries, checkPermission domain.PermissionCheck, ) *Server { return &Server{ command: command, query: query, checkPermission: checkPermission, systemDefaults: systemDefaults, } } func (s *Server) RegisterConnectServer(interceptors ...connect.Interceptor) (string, http.Handler) { return applicationconnect.NewApplicationServiceHandler(s, connect.WithInterceptors(interceptors...)) } func (s *Server) FileDescriptor() protoreflect.FileDescriptor { return application.File_zitadel_application_v2_application_service_proto } func (s *Server) AppName() string { return application.ApplicationService_ServiceDesc.ServiceName } func (s *Server) MethodPrefix() string { return application.ApplicationService_ServiceDesc.ServiceName } func (s *Server) AuthMethods() authz.MethodMapping { return application.ApplicationService_AuthMethods }