exprmapper

package
v0.5.9 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: BSD-3-Clause Imports: 18 Imported by: 10 modules, 14 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 GetExpresssionValue added in v0.5.7

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

func MapExpreesion added in v0.5.7

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

func RemovePrefixInput

func RemovePrefixInput(str string) string

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{}, tomapField *field.MappingField, 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