Closed giggio closed 1 week ago
I could send a PR if that would help.
Can you please explain why you need abstractions over that class? The library gives you whatever instances/types you need. What references are you creating?
After creating the issue I worked over the abstraction I needed, and it is actually a base lease interface. I created as a record, but it is copying data because of the lack of an abstracting in this library. You can see it here: https://github.com/giggio-samples/vault-k8s-sample/blob/main/src/VaultApi/BaseLease.cs And it being used here: https://github.com/giggio-samples/vault-k8s-sample/blob/fad7340a339b6ced0764bf59912d9609552f6bb0/src/VaultApi/VaultClientFactory.cs#L32 And here: https://github.com/giggio-samples/vault-k8s-sample/blob/fad7340a339b6ced0764bf59912d9609552f6bb0/src/VaultApi/VaultClientFactory.cs#L54 And here: https://github.com/giggio-samples/vault-k8s-sample/blob/fad7340a339b6ced0764bf59912d9609552f6bb0/src/VaultApi/MongoClientFactory.cs#L45
@giggio the intent is to not have a untyped abstraction. It is error prone. Cast Exception etc. Let me know, if you are missing anything concrete.
Describe the feature request or question Create
Secret
, base class ofSecret<T>
(it could also be an interface). It would contain everythingSecret<T>
has, but thepublic TData Data { get; set; }
property.Link to the Vault API Docs that support this feature N/A
Additional context There is currently no way to abstract over different
Secret<T>
s. For example, when one creates a credential, you get aSecret<UsernamePasswordCredentials>
, when you renew it, you get aSecret<RenewedLease>
, and we need to create different references, with no way to abstract over them. With an abstract base classe ofSecret
we could do that.