xproperty

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2020 License: MIT Imports: 4 Imported by: 0

README

xproperty

Functions
  • type PropertyMappers struct {}
  • type PropertyMapper struct {}
  • type PropertyMapperValue struct {}
  • New() *PropertyMappers
  • NewMapper(from interface{}, to interface{}, dict map[string]*PropertyMapperValue) *PropertyMapper
  • NewValue(revert bool, destProps ...string) *PropertyMapperValue
  • (p *PropertyMappers) AddMapper(mapper *PropertyMapper)
  • (p *PropertyMappers) AddMappers(mappers ...*PropertyMapper)
  • (p *PropertyMappers) GetMapper(from interface{}, to interface{}) (*PropertyMapper, error)
  • (p *PropertyMappers) GetMapperDefault(from interface{}, to interface{}) *PropertyMapper
  • AddMapper(mapper *PropertyMapper)
  • AddMappers(mappers ...*PropertyMapper)
  • GetMapper(from interface{}, to interface{}) (*PropertyMapper, error)
  • GetMapperDefault(from interface{}, to interface{}) *PropertyMapper
Extension Functions
  • (p *PropertyMapper) ApplyOrderBy(source string) string

Documentation

Index

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

Jump to

Keyboard shortcuts

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