Standardize action results

This commit is contained in:
mudler
2025-03-01 17:27:07 +01:00
parent 8492c95cb6
commit 5b4f618ca3
22 changed files with 108 additions and 67 deletions

View File

@@ -33,8 +33,8 @@ type StateResult struct {
Goal string `json:"goal"`
}
func (a *StateAction) Run(context.Context, ActionParams) (string, error) {
return "internal state has been updated", nil
func (a *StateAction) Run(context.Context, ActionParams) (ActionResult, error) {
return ActionResult{Result: "internal state has been updated"}, nil
}
func (a *StateAction) Definition() ActionDefinition {