adding OBS support

This commit is contained in:
lwoodard
2026-04-16 15:23:46 -06:00
parent ae1ab88d4a
commit 6f2290bd6c
5 changed files with 326 additions and 23 deletions

View File

@@ -100,6 +100,15 @@ func funcMap() template.FuncMap {
// Use this to keep secrets (tokens, passwords) out of modules.yaml.
"env": os.Getenv,
// envDefault returns the value of an environment variable, or
// fallback if the variable is empty/unset.
"envDefault": func(key, fallback string) string {
if v := os.Getenv(key); v != "" {
return v
}
return fallback
},
// expiry converts a duration string like "+1h" to a Unix epoch timestamp string.
// Pass "" or "0" to get "0" (no expiry). Supports Go duration syntax (e.g. "30m", "2h").
// Note: time.ParseDuration does not support days (d) or weeks (w).