Documentation
¶
Index ¶
- func ExtractAnnotation(doc *ast.CommentGroup) string
- func IsErrorReturningConverterSignature(fn types.FunctionInfo) bool
- func IsSafeConverterSignature(fn types.FunctionInfo) bool
- func LoadExternalPackage(importPath, alias string) (map[string]types.SourceStruct, error)
- func ParseFields(structType *ast.StructType) []types.FieldInfo
- func ParseFunctions(file *ast.File) map[string]types.FunctionInfo
- func ParsePackage(pkgPath string, cfg *config.Config) ([]types.DTOMapping, map[string]types.SourceStruct, ...)
- func ParseSourceList(annotation string) []string
- func ParseStruct(structType *ast.StructType) types.SourceStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractAnnotation ¶
func ExtractAnnotation(doc *ast.CommentGroup) string
ExtractAnnotation extracts the automapper annotation from comments
func IsErrorReturningConverterSignature ¶
func IsErrorReturningConverterSignature(fn types.FunctionInfo) bool
IsErrorReturningConverterSignature checks if a function matches error-returning converter signature: func(T) (U, error)
func IsSafeConverterSignature ¶
func IsSafeConverterSignature(fn types.FunctionInfo) bool
IsSafeConverterSignature checks if a function matches safe converter signature: func(T) U
func LoadExternalPackage ¶
func LoadExternalPackage(importPath, alias string) (map[string]types.SourceStruct, error)
LoadExternalPackage loads a package from the module system (can be remote)
func ParseFields ¶
func ParseFields(structType *ast.StructType) []types.FieldInfo
ParseFields extracts field information including tags
func ParseFunctions ¶
func ParseFunctions(file *ast.File) map[string]types.FunctionInfo
ParseFunctions extracts function declarations from AST
func ParsePackage ¶
func ParsePackage( pkgPath string, cfg *config.Config, ) ( []types.DTOMapping, map[string]types.SourceStruct, map[string]types.FunctionInfo, string, error, )
ParsePackage parses the main package and external packages
func ParseSourceList ¶
ParseSourceList parses a comma-separated list of source types
func ParseStruct ¶
func ParseStruct(structType *ast.StructType) types.SourceStruct
ParseStruct extracts field information from a struct type
Types ¶
This section is empty.