@azure/cosmos
Version:
Microsoft Azure Cosmos DB Service Node.js SDK for NOSQL API
32 lines • 1.18 kB
JavaScript
;
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.EncryptionSettings = void 0;
/**
* stores partitionKeyPaths, all the pathsToEncrypt, and encryption settings (cekId, encryption type, and algorithm) for each property.
* see {@link EncryptionSettingForProperty}
* @hidden
*/
class EncryptionSettings {
id; // databaseRid + '/' + containerRid
containerRid;
partitionKeyPaths;
pathsToEncrypt = [];
// key is property path
encryptionSettingForProperties = {};
// getContainerRid
constructor(id, containerRid, partitionKeyPaths) {
this.id = id;
this.containerRid = containerRid;
this.partitionKeyPaths = partitionKeyPaths;
}
setEncryptionSettingForProperty(key, encryptionSettingForProperty) {
this.encryptionSettingForProperties[key] = encryptionSettingForProperty;
}
getEncryptionSettingForProperty(propertyName) {
return this.encryptionSettingForProperties[propertyName];
}
}
exports.EncryptionSettings = EncryptionSettings;
//# sourceMappingURL=EncryptionSettings.js.map