Documentation ¶
Index ¶
- func AddMapper(mapper *PropertyMapper)
- func AddMappers(mappers ...*PropertyMapper)
- type PropertyMapper
- type PropertyMapperValue
- type PropertyMappers
- func (p *PropertyMappers) AddMapper(mapper *PropertyMapper)
- func (p *PropertyMappers) AddMappers(mappers ...*PropertyMapper)
- func (p *PropertyMappers) GetMapper(from interface{}, to interface{}) (*PropertyMapper, error)
- func (p *PropertyMappers) GetMapperDefault(from interface{}, to interface{}) *PropertyMapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddMapper ¶
func AddMapper(mapper *PropertyMapper)
func AddMappers ¶
func AddMappers(mappers ...*PropertyMapper)
Types ¶
type PropertyMapper ¶
type PropertyMapper struct {
// contains filtered or unexported fields
}
An entity mapper
func GetMapper ¶
func GetMapper(from interface{}, to interface{}) (*PropertyMapper, error)
func GetMapperDefault ¶
func GetMapperDefault(from interface{}, to interface{}) *PropertyMapper
func NewMapper ¶
func NewMapper(from interface{}, to interface{}, dict map[string]*PropertyMapperValue) *PropertyMapper
func (*PropertyMapper) ApplyOrderBy ¶
func (p *PropertyMapper) ApplyOrderBy(source string) string
type PropertyMapperValue ¶
type PropertyMapperValue struct {
// contains filtered or unexported fields
}
A destination mapping property Example:
name -> first last age -> birth
func NewValue ¶
func NewValue(revert bool, destProps ...string) *PropertyMapperValue
type PropertyMappers ¶
type PropertyMappers struct {
// contains filtered or unexported fields
}
A whole mappers container
func New ¶
func New() *PropertyMappers
func (*PropertyMappers) AddMapper ¶
func (p *PropertyMappers) AddMapper(mapper *PropertyMapper)
func (*PropertyMappers) AddMappers ¶
func (p *PropertyMappers) AddMappers(mappers ...*PropertyMapper)
func (*PropertyMappers) GetMapper ¶
func (p *PropertyMappers) GetMapper(from interface{}, to interface{}) (*PropertyMapper, error)
func (*PropertyMappers) GetMapperDefault ¶
func (p *PropertyMappers) GetMapperDefault(from interface{}, to interface{}) *PropertyMapper
Click to show internal directories.
Click to hide internal directories.