Documentation ¶
Index ¶
- Constants
- func ConvertLegacyMappings(mappings *LegacyMappings, resolver resolve.CompositeResolver) (input map[string]interface{}, output map[string]interface{}, err error)
- func ConvertMappingValue(mappingType string, mappingValue interface{}) (interface{}, error)
- func HandleMappings(mappings []*LegacyMapping, resolver resolve.CompositeResolver) (map[string]interface{}, error)
- func Insert(slice []interface{}, index int, value interface{}) []interface{}
- func IsIdentRune(ch rune, i int) bool
- func IsLiteral(value interface{}) bool
- func NewObjectMapperFactory(exprFactory expression.Factory) expression.Factory
- func ResolvableExpr(expr string, resolver resolve.CompositeResolver) bool
- func ToNewArray(mapping *LegacyArrayMapping, resolver resolve.CompositeResolver) (interface{}, error)
- func ToNewArrayChildMapto(old string) string
- type ExprMapper
- type ExprMapperFactory
- type Factory
- type LegacyArrayMapping
- type LegacyMapping
- type LegacyMappings
- type Mapper
- type MappingField
- type ObjectMapper
- type ObjectMapperFactory
Constants ¶
View Source
const ( //To do an array mapping from upstreaming, use @foreach. /* "input": { "val" : { "a" : "=$activity[blah].out", "addresses": { "@foreach($activity[blah].out2, i)": { "street" : "=$.street", "zipcode" : "9999", "state" : "=$activity[test].state", "addresses2": { "@foreach($.addresses2)":{ "street2" : "=$loop[i].street2", "zipcode2" : "=$.zipcode", "state2" : "=$activity[test].state" } } } } } } */ FOREACH = "@foreach" )
Variables ¶
This section is empty.
Functions ¶
func ConvertLegacyMappings ¶
func ConvertLegacyMappings(mappings *LegacyMappings, resolver resolve.CompositeResolver) (input map[string]interface{}, output map[string]interface{}, err error)
func ConvertMappingValue ¶
Deprecated
func HandleMappings ¶
func HandleMappings(mappings []*LegacyMapping, resolver resolve.CompositeResolver) (map[string]interface{}, error)
func IsIdentRune ¶
func NewObjectMapperFactory ¶
func NewObjectMapperFactory(exprFactory expression.Factory) expression.Factory
func ResolvableExpr ¶
func ResolvableExpr(expr string, resolver resolve.CompositeResolver) bool
func ToNewArray ¶
func ToNewArray(mapping *LegacyArrayMapping, resolver resolve.CompositeResolver) (interface{}, error)
func ToNewArrayChildMapto ¶
Types ¶
type ExprMapper ¶
type ExprMapper struct {
// contains filtered or unexported fields
}
type ExprMapperFactory ¶
type ExprMapperFactory struct {
// contains filtered or unexported fields
}
type Factory ¶
func NewFactory ¶
func NewFactory(resolver resolve.CompositeResolver) Factory
type LegacyArrayMapping ¶
type LegacyArrayMapping struct { From interface{} `json:"from"` To string `json:"to"` Type string `json:"type"` Fields []*LegacyArrayMapping `json:"fields,omitempty"` }
DEPRECATED
func ParseArrayMapping ¶
func ParseArrayMapping(arrayDatadata interface{}) (*LegacyArrayMapping, error)
type LegacyMapping ¶
type LegacyMapping struct { Type interface{} `json:"type"` Value interface{} `json:"value"` MapTo string `json:"mapTo"` }
MappingDef is a simple structure that defines a mapping DEPRECATED
type LegacyMappings ¶
type LegacyMappings struct { Input []*LegacyMapping `json:"input,omitempty"` Output []*LegacyMapping `json:"output,omitempty"` }
DEPRECATED
type MappingField ¶
type MappingField struct {
// contains filtered or unexported fields
}
DEPRECATED, code from flogo-lib for map ref parser
func NewMappingField ¶
func NewMappingField(fields []string) *MappingField
func ParseMappingField ¶
func ParseMappingField(mRef string) (*MappingField, error)
func (*MappingField) Getfields ¶
func (m *MappingField) Getfields() []string
func (*MappingField) Parser ¶
func (m *MappingField) Parser() error
func (*MappingField) Start ¶
func (m *MappingField) Start(jsonPath string) error
type ObjectMapper ¶
type ObjectMapper struct {
// contains filtered or unexported fields
}
type ObjectMapperFactory ¶
type ObjectMapperFactory struct {
// contains filtered or unexported fields
}
func (*ObjectMapperFactory) NewExpr ¶
func (am *ObjectMapperFactory) NewExpr(value string) (expression.Expr, error)
func (*ObjectMapperFactory) NewObjectMapper ¶
func (am *ObjectMapperFactory) NewObjectMapper(value interface{}) (expression.Expr, error)
Click to show internal directories.
Click to hide internal directories.