kubricate / secret/SecretsInjectionContext / InferSecretStrategies
Type Alias: InferSecretStrategies<SM, Key>
ts
type InferSecretStrategies<SM, Key> = ExtractProviderStrategies<SM, InferSecretProviderKey<SM, Key>>;Infers the available injection strategies for a given secret. This combines secret-to-provider lookup with strategy extraction.
Type Parameters
SM
SM extends AnySecretManager
The SecretManager type
Key
Key extends keyof ExtractSecretManager<SM>["secretEntries"]
The secret name key from the secret entries
Example
typescript
type Strategies = InferSecretStrategies<MySecretManager, 'databasePassword'>;
// Result: 'env' | 'volume' (available strategies for this secret's provider)