-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resources S3 storage optimization #902
Conversation
return new S3LegacyResourceHandler(decodeURIComponent(path), bucketName, urlString); // endpoint from urlString is not used | ||
}; | ||
|
||
module.exports = { constructor, deserializer }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module.exports = { constructor, deserializer }; | |
module.exports = { constructor, deserializer }; | |
const data = this.targetHandler.serialize(); | ||
return { metadata: this.metadata, data }; | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}; | |
}; | |
return new S3ResourceHandler(data.path, data.bucketName, data.location, data.endpoint); | ||
}; | ||
|
||
module.exports = { constructor, deserializer }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module.exports = { constructor, deserializer }; | |
module.exports = { constructor, deserializer }; | |
|
||
}); | ||
|
||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}); | |
}); | |
console.log('All done!'); | ||
} | ||
|
||
test().catch(console.log); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test().catch(console.log); | |
test().catch(console.log); | |
} | ||
} | ||
|
||
module.exports = new StorageFactory(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module.exports = new StorageFactory(); | |
module.exports = new StorageFactory(); | |
"s3": "app/storage/s3ResourceHandler", | ||
"embedded": "app/storage/embeddedResourceHandler", | ||
"s3legacy": "app/storage/legacyS3ResourceHandler" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
} | |
|
||
} | ||
|
||
test().catch(console.log); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test().catch(console.log); | |
test().catch(console.log); | |
return new EmbeddedResourceHandler(data); | ||
}; | ||
|
||
module.exports = { constructor, deserializer }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module.exports = { constructor, deserializer }; | |
module.exports = { constructor, deserializer }; | |
} | ||
*/ | ||
|
||
module.exports = { encrypt, decryptBuffer }; // encryptStream, decryptStream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module.exports = { encrypt, decryptBuffer }; // encryptStream, decryptStream | |
module.exports = { encrypt, decryptBuffer }; // encryptStream, decryptStream | |
|
||
const encryptionAlgorithm = 'aes-256-cbc'; | ||
|
||
const encrypt = (stringOrBuffer, encryptionKey) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this new encryption, or a refactoring of what was already there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same encryption as we have today (has to be or decryption will not work), but it was duplicated across multiple files, now it's refactored a little and decoupled from S3client.
Added approval: combined rmgraham's earlier approval with @michael-topchiev 's approval of my added commit that dismissed rmgraham's.... == approved again. |
No description provided.