v1.6.10 Latest Latest

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

Go to latest
Published: May 7, 2024 License: BSD-3-Clause Imports: 11 Imported by: 38




View Source
const (
	Conditional = "@conditional"
	Otherwise   = "@otherwise"


This section is empty.


func ConvertMappingValue

func ConvertMappingValue(mappingType string, mappingValue interface{}) (interface{}, error)


func GetObjectMapping

func GetObjectMapping(value interface{}) (interface{}, bool)

func IsConditionalMapping added in v1.6.0

func IsConditionalMapping(value interface{}) bool

IsConditionalMapping check to see if the mapping is an conditional mapping

func NewObjectMapper added in v1.0.0

func NewObjectMapper(mappings interface{}, exprF expression.Factory) (expr expression.Expr, err error)

func NewObjectMapperFactory

func NewObjectMapperFactory(exprFactory expression.Factory) expression.Factory

func ToObjectMap added in v0.9.1

func ToObjectMap(value interface{}) (map[string]interface{}, error)


type ConditionalMapper added in v1.2.0

type ConditionalMapper struct {
	// contains filtered or unexported fields

func (*ConditionalMapper) Eval added in v1.2.0

func (fs *ConditionalMapper) Eval(scope data.Scope) (interface{}, error)

type ExprMapper

type ExprMapper struct {
	// contains filtered or unexported fields

func (*ExprMapper) Apply

func (m *ExprMapper) Apply(inputScope data.Scope) (map[string]interface{}, error)

type ExprMapperFactory

type ExprMapperFactory struct {
	// contains filtered or unexported fields

func (*ExprMapperFactory) NewMapper

func (mf *ExprMapperFactory) NewMapper(mappings map[string]interface{}) (Mapper, error)

type Factory

type Factory interface {
	NewMapper(mappings map[string]interface{}) (Mapper, error)

func NewFactory

func NewFactory(resolver resolve.CompositeResolver) Factory

type Mapper

type Mapper interface {
	Apply(scope data.Scope) (map[string]interface{}, error)

Mapper is a constructs that maps values to a map

type ObjectMapper

type ObjectMapper struct {
	// contains filtered or unexported fields

func (*ObjectMapper) Eval

func (obj *ObjectMapper) Eval(scope data.Scope) (value interface{}, err error)

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)

type ObjectMapping

type ObjectMapping struct {
	Mapping interface{} `json:"mapping"`


Path Synopsis

Jump to

Keyboard shortcuts

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