Skip to content

Commit 38c237b

Browse files
committed
add description/category for secret function
1 parent 299c03e commit 38c237b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

dsc_lib/locales/en-us.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ incorrectNameFormat = "Name argument cannot contain a slash"
299299
invalidSecondArgType = "Invalid argument type for second parameter"
300300

301301
[functions.secret]
302+
description = "Retrieves a secret from a vault"
302303
notString = "Parameter secret name is not a string"
303304
multipleSecrets = "Multiple secrets with the same name '%{name}' and different values was returned, try specifying a vault"
304305
extensionReturnedError = "Extension '%{extension}': %{error}"

dsc_lib/src/functions/secret.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ impl Function for Secret {
1818
vec![AcceptedArgKind::String]
1919
}
2020

21+
fn description(&self) -> String {
22+
t!("functions.secret.description").to_string()
23+
}
24+
25+
fn category(&self) -> super::FunctionCategory {
26+
super::FunctionCategory::System
27+
}
28+
2129
fn min_args(&self) -> usize {
2230
1
2331
}

0 commit comments

Comments
 (0)