rpc/server: add notification filters

And check state string correctness on unmarshaling.
This commit is contained in:
Roman Khimov 2020-05-13 17:13:33 +03:00
parent 2dc16c0694
commit 393ce1c230
5 changed files with 284 additions and 39 deletions

View file

@ -191,7 +191,11 @@ func (p *Param) UnmarshalJSON(data []byte) error {
case *NotificationFilter:
p.Value = *val
case *ExecutionFilter:
p.Value = *val
if (*val).State == "HALT" || (*val).State == "FAULT" {
p.Value = *val
} else {
continue
}
case *[]Param:
p.Value = *val
}