feat: add functions again
Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
0d14152edf
commit
f2e85f7114
@ -105,9 +105,14 @@ spec:
|
|||||||
self: &std::sync::Arc<Self>,
|
self: &std::sync::Arc<Self>,
|
||||||
key: &minijinja::Value,
|
key: &minijinja::Value,
|
||||||
) -> Option<minijinja::Value> {
|
) -> Option<minijinja::Value> {
|
||||||
|
let name = self.name.clone();
|
||||||
let obj = match key.as_str()? {
|
let obj = match key.as_str()? {
|
||||||
"name" => Value::from_safe_string(self.name.clone()),
|
"name" => Value::from_safe_string(self.name.clone()),
|
||||||
"secrets" => Value::from_object(self.secrets.clone()),
|
"secrets" => Value::from_object(self.secrets.clone()),
|
||||||
|
"has_values" => Value::from_serialize(!self.secrets.secrets.is_empty()),
|
||||||
|
"file_name" => Value::from_function(move |file_name: String| {
|
||||||
|
format!("{}-{}", file_name, name.replace("/", "-"))
|
||||||
|
}),
|
||||||
_ => return None,
|
_ => return None,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
nested
|
@ -0,0 +1 @@
|
|||||||
|
nested
|
Loading…
Reference in New Issue
Block a user