go_mapper

package module
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: MIT Imports: 5 Imported by: 0

README

go-mapper

Reference from stroiman/go-automapper

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Map

func Map(source, dest interface{}, loose bool) (err error)

func RegisterMapping

func RegisterMapping(from, to string, f MapperFunc)

func SetWrapperType added in v1.0.7

func SetWrapperType(typeStr string, wrapper bool)

func UnregisterMapping

func UnregisterMapping(from, to string)

Types

type IMapper

type IMapper interface {
	Map(source, dest interface{}, loose bool)

	RegisterMapping(from, to string, f MapperFunc)
	UnregisterMapping(from, to string)
	SetWrapperType(typeStr string, wrapper bool)
}

func GetMapper

func GetMapper() IMapper

func NewDefaultMapper

func NewDefaultMapper() IMapper

type MapperFunc

type MapperFunc func(any) (any, error)

Jump to

Keyboard shortcuts

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