mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
Github issue / Community forum post (link here to close automatically): --------- Co-authored-by: Romain Minaud <romain.minaud@gmail.com> Co-authored-by: Valya Bullions <valya@n8n.io> Co-authored-by: Csaba Tuncsik <csaba@n8n.io> Co-authored-by: Giulio Andreini <g.andreini@gmail.com> Co-authored-by: Omar Ajoue <krynble@gmail.com>
25 lines
595 B
TypeScript
25 lines
595 B
TypeScript
import type { SecretsProvider } from '@/Interfaces';
|
|
import { Service } from 'typedi';
|
|
import { InfisicalProvider } from './providers/infisical';
|
|
import { VaultProvider } from './providers/vault';
|
|
|
|
@Service()
|
|
export class ExternalSecretsProviders {
|
|
providers: Record<string, { new (): SecretsProvider }> = {
|
|
infisical: InfisicalProvider,
|
|
vault: VaultProvider,
|
|
};
|
|
|
|
getProvider(name: string): { new (): SecretsProvider } | null {
|
|
return this.providers[name] ?? null;
|
|
}
|
|
|
|
hasProvider(name: string) {
|
|
return name in this.providers;
|
|
}
|
|
|
|
getAllProviders() {
|
|
return this.providers;
|
|
}
|
|
}
|