Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FieldMapping ¶
type FieldMapping struct {
DstName string
SrcName string
DstType types.Type
SrcType types.Type
Op Operation
TransformFunc string
TransformHasError bool
TransformImportPkg string // e.g., "strings" or full import path
TransformFuncName string // e.g., "ToUpper"
// For composite types
ElemSrc types.Type // slice element or map value
ElemDst types.Type // slice element or map value
KeySrc types.Type // map key
KeyDst types.Type // map key
}
type Operation ¶
type Operation int
const ( OpDirectAssign Operation = iota // identical or assignable types OpConvert // requires a conversion to destination type OpAddrOf // dst is *T, src is T OpAddrOfConvert // dst is *T, src is S convertible to T OpDeref // dst is T, src is *T OpDerefConvert // dst is T, src is *S convertible to T OpSliceAssign // []S -> []D where S assignable to D OpSliceConvert // []S -> []D where S convertible to D OpMapAssign // map[K]V -> map[K]V assignable key/value OpTransform // call custom transform function: dst = Fn(src) OpTransformErr // call transform that returns (Out, error) OpRecurseStruct // nested struct mapping via local helper )
type Plan ¶
type Plan struct {
Mappings []FieldMapping
Skipped []SkipReason
}
type SkipReason ¶
Click to show internal directories.
Click to hide internal directories.