Documentation ¶
Index ¶
- func LoadDiFactroy() baseiface.ISingleton
- func LoadFileInfoDto() baseiface.ISingleton
- func LoadStructInfo() baseiface.ISingleton
- type FileinfoDto
- type GodiFactroy
- func (this *GodiFactroy) ExistNewFunc(nodes *ast.File, functionName string) bool
- func (this *GodiFactroy) FindBasePkg() string
- func (this *GodiFactroy) FindFile(file string) *FileinfoDto
- func (this *GodiFactroy) FindGoFiles() error
- func (this *GodiFactroy) FindSome(struname string) *FileinfoDto
- func (this *GodiFactroy) MakeBatch(structInfo *StructInfo) bool
- func (this *GodiFactroy) MakeDi(dto *didto.DiDto) error
- func (this *GodiFactroy) MakeDiAll()
- func (this *GodiFactroy) Parse(file string) *FileinfoDto
- func (this *GodiFactroy) ParseAll()
- func (this *GodiFactroy) ParseDir(pathf string)
- func (this *GodiFactroy) ParseFunc(decl *ast.FuncDecl)
- func (this *GodiFactroy) ParseOneStruct(decl *ast.GenDecl, nodes *ast.File, path string) *StructInfo
- func (this *GodiFactroy) Pasre2JsonFile()
- type StructInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadDiFactroy ¶
func LoadDiFactroy() baseiface.ISingleton
func LoadFileInfoDto ¶
func LoadFileInfoDto() baseiface.ISingleton
func LoadStructInfo ¶
func LoadStructInfo() baseiface.ISingleton
Types ¶
type FileinfoDto ¶
type FileinfoDto struct { basedto.BaseEntity PathFile string `json:"path_file,omitempty"` FileContent string `json:"content,omitempty"` StructInfoMap map[string]*StructInfo `json:"struct_info_map,omitempty"` StructInfos []*StructInfo Funcs []string `json:"funcs"` Node *ast.File `json:"-"` }
func FindBeanFileInfoDto ¶
func FindBeanFileInfoDto() *FileinfoDto
func NewFileInfoDto ¶
func NewFileInfoDto() *FileinfoDto
func (*FileinfoDto) ExistNewFunc ¶
func (this *FileinfoDto) ExistNewFunc(Struname string) bool
type GodiFactroy ¶
type GodiFactroy struct { basedto.BaseEntitySingle BasePkg string Rootdir string FileInfoDtos []*FileinfoDto StructInfos [][]*StructInfo StructInfoMap map[string]*StructInfo }
func FindBeanDiFactroy ¶
func FindBeanDiFactroy() *GodiFactroy
func NewDiFactroy ¶
func NewDiFactroy() *GodiFactroy
func (*GodiFactroy) ExistNewFunc ¶
func (this *GodiFactroy) ExistNewFunc(nodes *ast.File, functionName string) bool
func (*GodiFactroy) FindBasePkg ¶
func (this *GodiFactroy) FindBasePkg() string
func (*GodiFactroy) FindFile ¶
func (this *GodiFactroy) FindFile(file string) *FileinfoDto
func (*GodiFactroy) FindGoFiles ¶
func (this *GodiFactroy) FindGoFiles() error
func (*GodiFactroy) FindSome ¶
func (this *GodiFactroy) FindSome(struname string) *FileinfoDto
func (*GodiFactroy) MakeBatch ¶
func (this *GodiFactroy) MakeBatch(structInfo *StructInfo) bool
func (*GodiFactroy) MakeDiAll ¶
func (this *GodiFactroy) MakeDiAll()
func (*GodiFactroy) Parse ¶
func (this *GodiFactroy) Parse(file string) *FileinfoDto
func (*GodiFactroy) ParseAll ¶
func (this *GodiFactroy) ParseAll()
func (*GodiFactroy) ParseDir ¶
func (this *GodiFactroy) ParseDir(pathf string)
func (*GodiFactroy) ParseFunc ¶
func (this *GodiFactroy) ParseFunc(decl *ast.FuncDecl)
func (*GodiFactroy) ParseOneStruct ¶
func (this *GodiFactroy) ParseOneStruct(decl *ast.GenDecl, nodes *ast.File, path string) *StructInfo
func (*GodiFactroy) Pasre2JsonFile ¶
func (this *GodiFactroy) Pasre2JsonFile()
type StructInfo ¶
type StructInfo struct { basedto.BaseEntity IsBaseEntiyStruct bool *didto.DiDto MethodNames []string `json:"methodNameList,omitempty"` Fields []string //成员的成员 FieldsMap map[string]string }
func FindBeanStructInfo ¶
func FindBeanStructInfo() *StructInfo
func NewStructInfo ¶
func NewStructInfo() *StructInfo
func (*StructInfo) AddField ¶
func (s *StructInfo) AddField(fieldName string)
func (*StructInfo) AddMethodName ¶
func (s *StructInfo) AddMethodName(methodName string)
func (*StructInfo) CheckBaseEntity ¶
func (this *StructInfo) CheckBaseEntity() bool
func (*StructInfo) NewStruMethod ¶
func (this *StructInfo) NewStruMethod() string
func (*StructInfo) ParsePkgName ¶
func (s *StructInfo) ParsePkgName(rootdir, basepkg string)
Click to show internal directories.
Click to hide internal directories.