mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 23:52:09 +00:00
Begin frontend for blinded indices
This commit is contained in:
@@ -1,7 +1,18 @@
|
||||
// WIP
|
||||
import { Types } from 'mongoose';
|
||||
import {
|
||||
createSecretBlindIndexHelper,
|
||||
getSecretBlindIndexHelper
|
||||
} from '../helpers/secrets';
|
||||
|
||||
class SecretService {
|
||||
/**
|
||||
* Create and return blind index for secret with
|
||||
* name [name] part of workspace with id [workspaceId]
|
||||
* @param {Object} obj
|
||||
* @param {Object} obj.secretName - name of secret to generate blind index for
|
||||
* @param {Object} obj.workspaceId - id of workspace that secret belongs to
|
||||
*/
|
||||
static async createSecretBlindIndex({
|
||||
secretName,
|
||||
workspaceId,
|
||||
@@ -9,10 +20,19 @@ class SecretService {
|
||||
secretName: string;
|
||||
workspaceId: Types.ObjectId;
|
||||
}) {
|
||||
// TODO
|
||||
return;
|
||||
return await createSecretBlindIndexHelper({
|
||||
secretName,
|
||||
workspaceId
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the blind index for the secret with
|
||||
* name [name] part of workspace with id [workspaceId]
|
||||
* @param {Object} obj
|
||||
* @param {Object} obj.secretName - name of secret to generate blind index for
|
||||
* @param {Object} obj.workspaceId - id of workspace that secret belongs to
|
||||
*/
|
||||
static async getSecretBlindIndex({
|
||||
secretName,
|
||||
workspaceId
|
||||
@@ -20,7 +40,11 @@ class SecretService {
|
||||
secretName: string;
|
||||
workspaceId: Types.ObjectId;
|
||||
}) {
|
||||
// TODO
|
||||
return;
|
||||
return await getSecretBlindIndexHelper({
|
||||
secretName,
|
||||
workspaceId
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default SecretService;
|
||||
@@ -5,14 +5,14 @@ import BotService from './BotService';
|
||||
import EventService from './EventService';
|
||||
import IntegrationService from './IntegrationService';
|
||||
import TokenService from './TokenService';
|
||||
import SecretService from './SecretService';
|
||||
|
||||
export {
|
||||
TelemetryService,
|
||||
// logTelemetryMessage,
|
||||
// getPostHogClient,
|
||||
DatabaseService,
|
||||
BotService,
|
||||
EventService,
|
||||
IntegrationService,
|
||||
TokenService
|
||||
TokenService,
|
||||
SecretService
|
||||
}
|
||||
Reference in New Issue
Block a user