# Functions
CreateFileFromTemplate generates a new file from the given template and data.
CreatePool generates the pool package by parsing the source code AST of the given program.
ExtractFunctionName returns the name of the called function in the given call expression.
GetModelsASTData returns the ModelASTData of all models found when parsing program.
GetModelsASTDataForModules returns the MethodASTData for all methods in given modules.
GetModulePackages returns a slice of PackageInfo for packages that are hexya modules, that is: - A package that declares a "MODULE_NAME" constant - A package that is in a subdirectory of a package Also returns the 'hexya/models' package since all models are initialized there.
NewModuleInfo returns a pointer to a new moduleInfo instance.
# Constants
Base is the PackageType for the base package of a module.
DatesPath is the go import path of the hexya/models/types/dates package.
HexyaPath is the go import path of the base hexya package.
Models is the PackageType for the hexya/models package.
ModelsPath is the go import path of the hexya/models package.
PoolInterfacesPackage is the name of the pool packages with all model interfaces.
PoolModelPackage is the name of the pool package with model data.
PoolPath is the go import path of the autogenerated pool package.
PoolQueryPackage is the name of the pool package with query dat.
# Variables
ModelMixins are the names of the mixins declared in the models package.
# Structs
A FieldASTData is a holder for a field's data that will be used for pool code generation.
A MethodASTData is a holder for a method's data that will be used for pool code generation.
A ModelASTData holds fields and methods data of a Model.
A ModuleInfo is a wrapper around packages.Package with additional data to describe a module.
A ParamData holds the name and type of a method parameter.
A TypeData holds a Type string and optional import path for this type.
# Type aliases
A PackageType describes a type of module.