exprmapper

package
v0.5.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2018 License: BSD-3-Clause Imports: 17 Imported by: 14

Documentation

Index

Constants

View Source
const (
	PRIMITIVE = "primitive"
	FOREACH   = "foreach"
	NEWARRAY  = "NEWARRAY"
)
View Source
const (
	MAP_TO_INPUT = "$INPUT"
)

Variables

This section is empty.

Functions

func GetMappingValue

func GetMappingValue(mappingV interface{}, inputScope data.Scope, resolver data.Resolver) (interface{}, error)

func GetValueFromArrayRef

func GetValueFromArrayRef(object interface{}, expressionRef interface{}, inputScope data.Scope, resolver data.Resolver) (interface{}, error)

func Map

func Map(mapping *data.MappingDef, inputScope, outputScope data.Scope, resolver data.Resolver) error

func RemovePrefixInput

func RemovePrefixInput(str string) string

func SetAttribute

func SetAttribute(fieldName string, value interface{}, outputScope data.Scope) error

func SetValueToOutputScope

func SetValueToOutputScope(mapTo string, outputScope data.Scope, value interface{}) error

Types

type ArrayMapping

type ArrayMapping struct {
	From   interface{}     `json:"from"`
	To     string          `json:"to"`
	Type   string          `json:"type"`
	Fields []*ArrayMapping `json:"fields,omitempty"`
}

func ParseArrayMapping

func ParseArrayMapping(arrayDatadata interface{}) (*ArrayMapping, error)

func (*ArrayMapping) DoArrayMapping

func (a *ArrayMapping) DoArrayMapping(inputScope, outputScope data.Scope, resolver data.Resolver) (err error)

func (*ArrayMapping) DoMap

func (a *ArrayMapping) DoMap(fromValue, value interface{}, to string, inputScope, outputScope data.Scope, resolver data.Resolver) error

func (*ArrayMapping) RemovePrefixForMapTo

func (a *ArrayMapping) RemovePrefixForMapTo()

func (*ArrayMapping) Validate

func (a *ArrayMapping) Validate() error

Directories

Path Synopsis
function
Package gabs implements a simplified wrapper around creating and parsing JSON.
Package gabs implements a simplified wrapper around creating and parsing JSON.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL