Documentation
¶
Index ¶
- func Delete(object interface{}, name string) error
- func Get(object interface{}, path string) interface{}
- func GetOK(object interface{}, path string) (interface{}, bool)
- func Index(value string, maximum int) (int, error)
- func Match(getter Getter, criteria exp.Expression) bool
- func Set(object interface{}, name string, value interface{}) error
- func SetAll(object interface{}, dataset map[string]interface{}) error
- type Deleter
- type Getter
- type Setter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
func Get(object interface{}, path string) interface{}
Get tries to return the value of the object at this path.
func GetOK ¶ added in v0.8.0
GetOK returns the value of the object at the provided path. If a value does not already exist, then the OK boolean is false.
func Index ¶ added in v0.7.0
Index is useful for vetting array indices. It attempts to convert the Head() token int an integer, and then check that the integer is within the designated array bounds (is greater than zero, and less than the maximum value provided to the function).
It returns the array index and an error
func Match ¶ added in v0.5.0
func Match(getter Getter, criteria exp.Expression) bool
Match returns TRUE if the provided Getter matches the provided expression
Types ¶
type Deleter ¶ added in v0.3.0
Deleter interface allows other objects to make it easy to trace through their property trees, and delete values from them.