github.com/safing/portbase@v0.19.5/database/accessor/accessor.go (about) 1 package accessor 2 3 const ( 4 emptyString = "" 5 ) 6 7 // Accessor provides an interface to supply the query matcher a method to retrieve values from an object. 8 type Accessor interface { 9 Get(key string) (value interface{}, ok bool) 10 GetString(key string) (value string, ok bool) 11 GetStringArray(key string) (value []string, ok bool) 12 GetInt(key string) (value int64, ok bool) 13 GetFloat(key string) (value float64, ok bool) 14 GetBool(key string) (value bool, ok bool) 15 Exists(key string) bool 16 Set(key string, value interface{}) error 17 Type() string 18 }