Finish minimal feature set, start with tests

This commit is contained in:
Daniel 2018-09-10 19:01:28 +02:00
parent 3d60431376
commit 06a34f931e
34 changed files with 651 additions and 346 deletions

View file

@ -4,6 +4,8 @@ import (
"errors"
"fmt"
"strconv"
"github.com/Safing/portbase/database/accessor"
)
type floatCondition struct {
@ -62,8 +64,8 @@ func newFloatCondition(key string, operator uint8, value interface{}) *floatCond
}
}
func (c *floatCondition) complies(f Fetcher) bool {
comp, ok := f.GetFloat(c.key)
func (c *floatCondition) complies(acc accessor.Accessor) bool {
comp, ok := acc.GetFloat(c.key)
if !ok {
return false
}