vapor
vapor copied to clipboard
added support for Map provider
I am currently using Vapor in conjunction with GCP Secret Management and ENVKEY secret management. The secret management pipeline for these tools return JSON dumps of the secret payload on request. Currently the only way to input these JSON maps into vapor is to write it to a .json
file, and then use the File
provider to read it back.
This PR adds support for providing the map directly as a separate provider.
Example use:
my_map = %{"FOO" => "BAR"}
providers = [
%Vapor.Provider.Map{
map: map,
bindings: [
foo: "FOO",
]
}
]
Vapor.load!(providers)