Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
func Apply(deStructs []DerefernceStruct, scope data.Scope, value interface{})
Types ¶
type CmlMapper ¶
type CmlMapper struct {
// contains filtered or unexported fields
}
Eg. If `math1` is defined as : [ 1 2 3
4 "Abc" 6 ]
Using this mapper we can directly do $math1[0][2] within the CML Specification To get the desired value.
type DerefernceStruct ¶
type DerefernceStruct struct { Id string //The id of data i.e. label of the data. Index string // The identifier of the value in the data. Eg math[0] or math['sample'] . 0 and 'sample' will be the Index. }
A struct which helps to navigate the data to find the value.
func NewExpression ¶
func NewExpression(str string) []DerefernceStruct
NewExpression returns the deference struct (which will help to navigate the data to find the value) from the given string.
Click to show internal directories.
Click to hide internal directories.