Germinate
A templating library for injecting variables from multiple external sources
Example
This is a simple example showing how to pull values from the environment
use germinate::Seed;
#[tokio::main]
async fn main() {
std::env::set_var("NAME", "John Wick");
let mut seed = Seed::new("Hi %env:NAME%!".into());
let output = seed.germinate().await.unwrap();
assert_eq!(String::from("Hi John Wick!"), output);
}
Sources
Currently implemented sources:
env
- Load values from environment variablesawsssm
- Load values from the AWS Systems Manager Parameter Store
Custom sources
For an example of integrating your own value source, checkout the Seed
struct in the docs