< Summary

Information
Class: Elsa.Secrets.Endpoints.Secrets.Descriptors.Endpoint
Assembly: Elsa.Secrets
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Secrets/Endpoints/Secrets/Descriptors/Endpoint.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 9
Coverable lines: 9
Total lines: 22
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%210%
Configure()100%210%
ExecuteAsync(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Secrets/Endpoints/Secrets/Descriptors/Endpoint.cs

#LineLine coverage
 1using Elsa.Abstractions;
 2using Elsa.Secrets.Permissions;
 3
 4namespace Elsa.Secrets.Endpoints.Secrets.Descriptors;
 5
 06internal class Endpoint(ISecretTypeRegistry typeRegistry, ISecretStoreRegistry storeRegistry) : ElsaEndpointWithoutReque
 7{
 8    public override void Configure()
 9    {
 010        Get("/secrets/descriptors");
 011        ConfigurePermissions(SecretsPermissions.Read);
 012    }
 13
 14    public override Task<SecretDescriptorsResponse> ExecuteAsync(CancellationToken cancellationToken)
 15    {
 016        return Task.FromResult(new SecretDescriptorsResponse
 017        {
 018            Types = typeRegistry.List().ToList(),
 019            Stores = storeRegistry.List().Select(x => x.Descriptor).ToList()
 020        });
 21    }
 22}