Documentation ¶
Index ¶
- func LoadDiFactroy() baseiface.ISingleton
- func LoadFileInfoDto() baseiface.ISingleton
- func LoadStructInfo() baseiface.ISingleton
- type DiFactroy
- func (this *DiFactroy) ExistNewFunc(nodes *ast.File, functionName string) bool
- func (this *DiFactroy) FindBasePkg() string
- func (this *DiFactroy) FindFile(file string) *FileinfoDto
- func (this *DiFactroy) FindGoFiles() error
- func (this *DiFactroy) FindSome(struname string) *FileinfoDto
- func (this *DiFactroy) MakeBatch(structInfo *StructInfo) bool
- func (this *DiFactroy) MakeDi(dto *didto.DiDto) error
- func (this *DiFactroy) MakeDiAll()
- func (this *DiFactroy) Parse(file string) *FileinfoDto
- func (this *DiFactroy) ParseAll()
- func (this *DiFactroy) ParseDir(pathf string)
- func (this *DiFactroy) ParseFunc(decl *ast.FuncDecl)
- func (this *DiFactroy) ParseOneStruct(decl *ast.GenDecl, nodes *ast.File, path string) *StructInfo
- func (this *DiFactroy) Pasre2JsonFile()
- type FileinfoDto
- type StructInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadDiFactroy ¶
func LoadDiFactroy() baseiface.ISingleton
func LoadFileInfoDto ¶ added in v1.0.61
func LoadFileInfoDto() baseiface.ISingleton
func LoadStructInfo ¶ added in v1.0.61
func LoadStructInfo() baseiface.ISingleton
Types ¶
type DiFactroy ¶
type DiFactroy struct { basedto.BaseEntitySingle BasePkg string Rootdir string FileInfoDtos []*FileinfoDto StructInfos [][]*StructInfo StructInfoMap map[string]*StructInfo }
func FindBeanDiFactroy ¶
func FindBeanDiFactroy() *DiFactroy
func NewDiFactroy ¶
func NewDiFactroy() *DiFactroy
func (*DiFactroy) ExistNewFunc ¶ added in v1.0.61
func (*DiFactroy) FindBasePkg ¶
func (*DiFactroy) FindFile ¶
func (this *DiFactroy) FindFile(file string) *FileinfoDto
func (*DiFactroy) FindGoFiles ¶
func (*DiFactroy) FindSome ¶ added in v1.0.70
func (this *DiFactroy) FindSome(struname string) *FileinfoDto
func (*DiFactroy) MakeBatch ¶
func (this *DiFactroy) MakeBatch(structInfo *StructInfo) bool
func (*DiFactroy) Parse ¶
func (this *DiFactroy) Parse(file string) *FileinfoDto
func (*DiFactroy) ParseOneStruct ¶
func (*DiFactroy) Pasre2JsonFile ¶ added in v1.0.61
func (this *DiFactroy) Pasre2JsonFile()
type FileinfoDto ¶ added in v1.0.101
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 ¶ added in v1.0.61
func FindBeanFileInfoDto() *FileinfoDto
func NewFileInfoDto ¶
func NewFileInfoDto() *FileinfoDto
func (*FileinfoDto) ExistNewFunc ¶ added in v1.0.101
func (this *FileinfoDto) ExistNewFunc(Struname string) bool
type StructInfo ¶
type StructInfo struct { basedto.BaseEntity IsBaseEntiyStruct bool *didto.DiDto MethodNames []string `json:"methodNameList,omitempty"` Fields []string //成员的成员 FieldsMap map[string]string }
func FindBeanStructInfo ¶ added in v1.0.61
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 ¶ added in v1.0.80
func (this *StructInfo) CheckBaseEntity() bool
func (*StructInfo) NewStruMethod ¶ added in v1.0.61
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.