MCPcopy Create free account
hub / github.com/daodst/chat / validateAction

Function validateAction

internal/pushrules/validate.go:58–70  ·  view source on GitHub ↗

validateAction returns issues with an Action.

(action *Action)

Source from the content-addressed store, hash-verified

56
57// validateAction returns issues with an Action.
58func validateAction(action *Action) []error {
59 var errs []error
60
61 switch action.Kind {
62 case NotifyAction, DontNotifyAction, CoalesceAction, SetTweakAction:
63 // Do nothing.
64
65 default:
66 errs = append(errs, fmt.Errorf("invalid rule action kind: %s", action.Kind))
67 }
68
69 return errs
70}
71
72// validateCondition returns issues with a Condition.
73func validateCondition(cond *Condition) []error {

Callers 3

ValidateRuleFunction · 0.85

Calls

no outgoing calls

Tested by 2