validateAction returns issues with an Action.
(action *Action)
| 56 | |
| 57 | // validateAction returns issues with an Action. |
| 58 | func 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. |
| 73 | func validateCondition(cond *Condition) []error { |
no outgoing calls