xproperty

package
v1.3.7 Latest Latest
Warning

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

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

README

xproperty

References
  • None
Functions
  • type PropertyMappers struct {}
  • type PropertyMapper struct {}
  • type PropertyDict map[string]*PropertyMapperValue
  • 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) GetDefaultMapper(from interface{}, to interface{}) *PropertyMapper
  • AddMapper(mapper *PropertyMapper)
  • AddMappers(mappers ...*PropertyMapper)
  • GetMapper(from interface{}, to interface{}) (*PropertyMapper, error)
  • GetDefaultMapper(from interface{}, to interface{}) *PropertyMapper
  • (p *PropertyDict) ApplyOrderBy(source string) string
  • (p *PropertyDict) ApplyCypherOrderBy(parent, source string) string
  • (p *PropertyMapper) ApplyOrderBy(source string) string
  • (p *PropertyMapper) ApplyCypherOrderBy(parent, source string) string

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMapper

func AddMapper(mapper *PropertyMapper)

Add a PropertyMapper to global PropertyMappers.

func AddMappers

func AddMappers(mappers ...*PropertyMapper)

Add some PropertyMapper to global PropertyMappers.

Types

type PropertyDict added in v1.3.7

type PropertyDict map[string]*PropertyMapperValue

PropertyDict represents a dictionary of property mapping.

func (*PropertyDict) ApplyCypherOrderBy added in v1.3.7

func (p *PropertyDict) ApplyCypherOrderBy(parent, source string) string

Apply orderBy (cypher version) string through PropertyDict.

func (*PropertyDict) ApplyOrderBy added in v1.3.7

func (p *PropertyDict) ApplyOrderBy(source string) string

Apply orderBy string through PropertyDict.

type PropertyMapper

type PropertyMapper struct {
	// contains filtered or unexported fields
}

A set of properties mapper.

func GetDefaultMapper added in v1.3.7

func GetDefaultMapper(from interface{}, to interface{}) *PropertyMapper

Get a default PropertyMapper from global PropertyMappers.

func GetMapper

func GetMapper(from interface{}, to interface{}) (*PropertyMapper, error)

Get a PropertyMapper from global PropertyMappers.

func NewMapper

func NewMapper(from interface{}, to interface{}, dict PropertyDict) *PropertyMapper

Create a PropertyMapper.

func (*PropertyMapper) ApplyCypherOrderBy added in v1.3.6

func (p *PropertyMapper) ApplyCypherOrderBy(parent, source string) string

Apply orderBy (cypher version) string through PropertyMapper.

func (*PropertyMapper) ApplyOrderBy

func (p *PropertyMapper) ApplyOrderBy(source string) string

Apply orderBy string through PropertyMapper.

type PropertyMapperValue

type PropertyMapperValue struct {
	// contains filtered or unexported fields
}

A property mapper.

func NewValue

func NewValue(revert bool, destProps ...string) *PropertyMapperValue

Create a PropertyMapperValue.

type PropertyMappers

type PropertyMappers struct {
	// contains filtered or unexported fields
}

A mappers container.

func New

func New() *PropertyMappers

Create a PropertyMappers.

func (*PropertyMappers) AddMapper

func (p *PropertyMappers) AddMapper(m *PropertyMapper)

Add a PropertyMapper to PropertyMappers.

func (*PropertyMappers) AddMappers

func (p *PropertyMappers) AddMappers(mappers ...*PropertyMapper)

Add some PropertyMapper to PropertyMappers.

func (*PropertyMappers) GetDefaultMapper added in v1.3.7

func (p *PropertyMappers) GetDefaultMapper(from interface{}, to interface{}) *PropertyMapper

Get a default PropertyMapper from PropertyMappers.

func (*PropertyMappers) GetMapper

func (p *PropertyMappers) GetMapper(from interface{}, to interface{}) (*PropertyMapper, error)

Get a PropertyMapper from PropertyMappers.

Jump to

Keyboard shortcuts

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