dto

package
v0.0.0-...-c47cd45 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2024 License: MulanPSL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InjectFileTemplate

func InjectFileTemplate(s *FileTemplate)

func InjectTableDto

func InjectTableDto(s *TableDto)

func InjectTableFile

func InjectTableFile(s *TableFile)

func InjectTableModelFactors

func InjectTableModelFactors(s *TableModelFactors)

func LoadFileTemplate

func LoadFileTemplate() baseiface.ISingleton

func LoadTableDto

func LoadTableDto() baseiface.ISingleton

func LoadTableFile

func LoadTableFile() baseiface.ISingleton

func LoadTableModelFactors

func LoadTableModelFactors() baseiface.ISingleton

Types

type BuildFileInf

type BuildFileInf struct {
	OutPath      string
	FileSuffix   string `json:"suffix"`
	TemplateFile string
}

func DefaultBuildFileInf

func DefaultBuildFileInf() *BuildFileInf

func NewBuildFileInf

func NewBuildFileInf(genPath string, fileSuffix string, templateFile string) *BuildFileInf

type FileTemplate

type FileTemplate struct {
	basedto.BaseEntity
	baseconfig.FactroyClientDto

	CodeOutPath  string
	TestOutpath  string
	CodeBasePath string
	Dbtype       string

	Gendirs              []string
	GendirDbPath, Gendir string
	GendirEsservice      string

	GendirPbTool, GendirPbToolBin, GendirGorpcProto string
	GendirGorpcService, GendirGorpcWeb              string
	TemplateFiles                                   map[int]string
	BuildFileInfs                                   map[int]*BuildFileInf
}

func FindBeanFileTemplate

func FindBeanFileTemplate() *FileTemplate

func NewFileTemplate

func NewFileTemplate() *FileTemplate

func (*FileTemplate) Append

func (this *FileTemplate) Append(key int, genPath string, fileSuffix string, templateFile string)

func (*FileTemplate) AppendGendirs

func (this *FileTemplate) AppendGendirs(dir string)

func (*FileTemplate) CreateDirs

func (this *FileTemplate) CreateDirs()

func (*FileTemplate) ExecPb

func (this *FileTemplate) ExecPb()

func (*FileTemplate) InfoPath

func (this *FileTemplate) InfoPath()

func (*FileTemplate) IniBuildFileInfs

func (this *FileTemplate) IniBuildFileInfs()

func (*FileTemplate) IniPath

func (this *FileTemplate) IniPath(dbtype string)

func (*FileTemplate) PathExists

func (this *FileTemplate) PathExists(path string) (bool, error)

func (*FileTemplate) ReCreateDirs

func (this *FileTemplate) ReCreateDirs()

func (*FileTemplate) ReadFile

func (this *FileTemplate) ReadFile(filename string) (string, error)

func (*FileTemplate) ReadTemplateFile

func (this *FileTemplate) ReadTemplateFile(fileKey int) string

func (*FileTemplate) ReadTemplateFileInf

func (this *FileTemplate) ReadTemplateFileInf(fileKey int) string

func (*FileTemplate) ReplacePkg

func (this *FileTemplate) ReplacePkg(content string) string

func (*FileTemplate) RmDirs

func (this *FileTemplate) RmDirs()

func (*FileTemplate) RmZip

func (this *FileTemplate) RmZip(table string)

func (*FileTemplate) TemplatePath

func (this *FileTemplate) TemplatePath() string

func (*FileTemplate) TransDir

func (this *FileTemplate) TransDir(path string, base string) string

func (*FileTemplate) WriteFile

func (this *FileTemplate) WriteFile(dfc *TableFile)

func (*FileTemplate) WriteFileModule

func (this *FileTemplate) WriteFileModule(tableFile *TableFile)

func (*FileTemplate) WriteFileModuleRpc

func (this *FileTemplate) WriteFileModuleRpc(dfc *TableFile)

type TableDto

type TableDto struct {
	basedto.BaseEntity

	Author string
	meta.MetaTable
	*TableFile

	TableFiles     []*TableFile
	TestTableFiles []*TableFile
}

func FindBeanTableDto

func FindBeanTableDto() *TableDto

func NewTableDto

func NewTableDto() *TableDto

func (*TableDto) FindModelTableFile

func (this *TableDto) FindModelTableFile() *TableFile

type TableDtos

type TableDtos struct {
	DbClientDto *baseconfig.DbClientDto
	DB          *gorm.DB `json:"-"`

	Tables     []*TableDto
	TableNames []string
}

func NewTableDtos

func NewTableDtos() *TableDtos

type TableFile

type TableFile struct {
	basedto.BaseEntity

	BaseDir  string `json:"base_dir"`
	Dir      string `json:"dir"`
	FileName string `json:"file"`
	Content  string `json:"-"` //目录, 文件, 内容

}

func Default

func Default() *TableFile

func FindBeanTableFile

func FindBeanTableFile() *TableFile

func NewTableFile

func NewTableFile(d, f, c string) *TableFile

func (*TableFile) FullPathFile

func (this *TableFile) FullPathFile() string

func (*TableFile) ReadPathFile

func (this *TableFile) ReadPathFile() string

type TableModelFactors

type TableModelFactors struct {
	basedto.BaseEntity
	Columns       *[]meta.MetaColumn
	Models        *list.List
	Protos        *list.List
	ModelEntities *list.List
	ModelParams   *list.List
}

func FindBeanTableModelFactors

func FindBeanTableModelFactors() *TableModelFactors

func NewTableModelFactors

func NewTableModelFactors() *TableModelFactors

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL