Documentation ¶
Index ¶
- func AddMapper(mapper *PropertyMapper)
- func AddMappers(mappers ...*PropertyMapper)
- type PropertyDict
- type PropertyMapper
- type PropertyMapperValue
- type PropertyMappers
- func (p *PropertyMappers) AddMapper(m *PropertyMapper)
- func (p *PropertyMappers) AddMappers(mappers ...*PropertyMapper)
- func (p *PropertyMappers) GetDefaultMapper(from interface{}, to interface{}) *PropertyMapper
- func (p *PropertyMappers) GetMapper(from interface{}, to interface{}) (*PropertyMapper, error)
- type VariableDict
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddMapper ¶
func AddMapper(mapper *PropertyMapper)
AddMapper adds a PropertyMapper to PropertyMappers.
func AddMappers ¶
func AddMappers(mappers ...*PropertyMapper)
AddMappers adds some PropertyMapper to PropertyMappers.
Types ¶
type PropertyDict ¶ added in v1.3.7
type PropertyDict map[string]*PropertyMapperValue
PropertyDict represents a dictionary of property mapping.
type PropertyMapper ¶
type PropertyMapper struct {
// contains filtered or unexported fields
}
PropertyMapper represents a property mapper.
func GetDefaultMapper ¶ added in v1.3.7
func GetDefaultMapper(from interface{}, to interface{}) *PropertyMapper
GetDefaultMapper returns the PropertyMapper from PropertyMappers, returns a empty PropertyMapper if not found.
func GetMapper ¶
func GetMapper(from interface{}, to interface{}) (*PropertyMapper, error)
GetMapper returns the PropertyMapper from PropertyMappers.
func NewMapper ¶
func NewMapper(from interface{}, to interface{}, dict PropertyDict) *PropertyMapper
NewMapper creates a PropertyMapper.
func (*PropertyMapper) GetDict ¶ added in v1.4.0
func (p *PropertyMapper) GetDict() PropertyDict
GetDict returns the PropertyDict from PropertyMapper.
type PropertyMapperValue ¶
type PropertyMapperValue struct { // Is need to revert sort. Revert bool // `from` -> `to` properties mapping. Destinations []string }
A property mapper.
func NewValue ¶
func NewValue(revert bool, destinations ...string) *PropertyMapperValue
NewValue creates a PropertyMapperValue.
type PropertyMappers ¶
type PropertyMappers struct {
// contains filtered or unexported fields
}
PropertyMappers represents a property mappers container.
func (*PropertyMappers) AddMapper ¶
func (p *PropertyMappers) AddMapper(m *PropertyMapper)
AddMapper adds a PropertyMapper to PropertyMappers.
func (*PropertyMappers) AddMappers ¶
func (p *PropertyMappers) AddMappers(mappers ...*PropertyMapper)
AddMappers adds some PropertyMapper to PropertyMappers.
func (*PropertyMappers) GetDefaultMapper ¶ added in v1.3.7
func (p *PropertyMappers) GetDefaultMapper(from interface{}, to interface{}) *PropertyMapper
GetDefaultMapper returns the PropertyMapper from PropertyMappers, returns a empty PropertyMapper if not found.
func (*PropertyMappers) GetMapper ¶
func (p *PropertyMappers) GetMapper(from interface{}, to interface{}) (*PropertyMapper, error)
GetMapper returns the PropertyMapper from PropertyMappers.
type VariableDict ¶ added in v1.4.0
VariableDict represents a dictionary of property id pair. (Almost used in cypher)