[docs] add Examples to each trigger/action

This commit is contained in:
2023-10-31 00:41:59 +01:00
parent 06534e0bbd
commit 8898565ff8
8 changed files with 98 additions and 6 deletions

View File

@@ -1,5 +1,4 @@
package triggers
import (
"encoding/json"
"fmt"
@@ -45,7 +44,21 @@ func (p TimeOut) GetName() string {
}
func (p TimeOut) GetDescription() string {
return "Triggers after given duration."
return "Triggers after given duration. Mostly used for debugging."
}
func (p TimeOut) GetExample() string {
return `
{
"type": "Timeout",
"name": "Example Trigger",
"options": {
"duration": 5
}
"actions": [
]
}
`
}
func (p TimeOut) GetOptions() []internal.ConfigOption {