Documentation ¶
Index ¶
- func MapObject(mappingObject interface{}, scope data.Scope, resolver data.Resolver) (result interface{}, err error)
- func NewAssignExpr(assignTo string, value interface{}) data.Expr
- func NewBasicMapper(mapperDef *data.MapperDef, resolver data.Resolver) data.Mapper
- func NewMapperDefFromAnyArray(mappings []interface{}) (*data.MapperDef, error)
- func SetFactory(factory Factory)
- type BasicMapper
- type BasicMapperFactory
- type Factory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAssignExpr ¶
func NewBasicMapper ¶
NewBasicMapper creates a new BasicMapper with the specified mappings
func SetFactory ¶
func SetFactory(factory Factory)
Types ¶
type BasicMapper ¶
type BasicMapper struct {
// contains filtered or unexported fields
}
BasicMapper is a simple object holding and executing mappings
func (*BasicMapper) Apply ¶
Apply executes the mappings using the values from the input scope and puts the results in the output scope
return error
func (*BasicMapper) Mappings ¶
func (m *BasicMapper) Mappings() []*data.MappingDef
Mappings gets the mappings of the BasicMapper
func (*BasicMapper) UpdateMapping ¶
func (m *BasicMapper) UpdateMapping() error
type BasicMapperFactory ¶
type BasicMapperFactory struct { }
func (*BasicMapperFactory) NewUniqueMapper ¶
type Factory ¶
type Factory interface { // NewMapper creates a new data.Mapper from the specified data.MapperDef NewMapper(mapperDef *data.MapperDef, resolver data.Resolver) data.Mapper // NewUniqueMapper creates a unique data.Mapper from the specified data.MapperDef // the ID can be used to facilitate use precompiled mappers NewUniqueMapper(ID string, mapperDef *data.MapperDef, resolver data.Resolver) data.Mapper }
func GetFactory ¶
func GetFactory() Factory
Click to show internal directories.
Click to hide internal directories.