mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-15 20:38:00 +00:00
b5564572bc
This implementation increases parallel write capabilities of the eventstore. Please have a look at the technical advisories: [05](https://zitadel.com/docs/support/advisory/a10005) and [06](https://zitadel.com/docs/support/advisory/a10006). The implementation of eventstore.push is rewritten and stored events are migrated to a new table `eventstore.events2`. If you are using cockroach: make sure that the database user of ZITADEL has `VIEWACTIVITY` grant. This is used to query events.
40 lines
1.1 KiB
Go
40 lines
1.1 KiB
Go
package admin
|
|
|
|
import (
|
|
"context"
|
|
|
|
instance_grpc "github.com/zitadel/zitadel/internal/api/grpc/instance"
|
|
"github.com/zitadel/zitadel/internal/api/grpc/object"
|
|
admin_pb "github.com/zitadel/zitadel/pkg/grpc/admin"
|
|
)
|
|
|
|
func (s *Server) GetMyInstance(ctx context.Context, _ *admin_pb.GetMyInstanceRequest) (*admin_pb.GetMyInstanceResponse, error) {
|
|
instance, err := s.query.Instance(ctx, true)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &admin_pb.GetMyInstanceResponse{
|
|
Instance: instance_grpc.InstanceDetailToPb(instance),
|
|
}, nil
|
|
}
|
|
|
|
func (s *Server) ListInstanceDomains(ctx context.Context, req *admin_pb.ListInstanceDomainsRequest) (*admin_pb.ListInstanceDomainsResponse, error) {
|
|
queries, err := ListInstanceDomainsRequestToModel(req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
domains, err := s.query.SearchInstanceDomains(ctx, queries)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &admin_pb.ListInstanceDomainsResponse{
|
|
Result: instance_grpc.DomainsToPb(domains.Domains),
|
|
Details: object.ToListDetails(
|
|
domains.Count,
|
|
domains.Sequence,
|
|
domains.LastRun,
|
|
),
|
|
}, nil
|
|
}
|