Skip to content

Commit

Permalink
Simple filter operator validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Vilsol committed Oct 21, 2018
1 parent f35d30f commit ce4648f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions filter/simple.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,12 @@ type Simple struct {
// The filter value
Value interface{} `json:"val"`
}

func (op Operation) Valid() bool {
return op == OpEQ ||
op == OpNEQ ||
op == OpLT ||
op == OpLTE ||
op == OpGT ||
op == OpGTE
}

0 comments on commit ce4648f

Please sign in to comment.