Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API for storing and retrieving "private" data
Adds an API that allows a consumer of Luerl to store private data that can be retrieved from functions called within Lua. This is useful in applications that may need to retrieve secrets from within Luerl, but don't want Lua scripts to be able to access these values. I've chatted with a number of users of Luerl, including Sam Aaron, who have had the need to expose secrets into their Luerl programs. Some have achieved this by using closures to close over private data and expose those functions to Luerl. I have used the process dictionary to acheive the same thing. If Luerl had an API to store and retrieve private data, as proposed by this PR, then both techniques would be unnecessary. Provide a `update_private/2` function instead that takes a function that can modify the private map - [ ] Get a nod from Robert - [ ] Implement in other "Elixir" API - [ ] Decide if we need to implement for "old" - [ ] Tests - [ ] Documentation
- Loading branch information