Documentation
¶
Overview ¶
Package tasks 处理的事务任务
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckFileExistedTask ¶
CheckFileExistedTask 检测文件是否存在
func (*CheckFileExistedTask) GetName ¶
func (c *CheckFileExistedTask) GetName() string
GetName 获取name
type CopyTemplateToOutputTask ¶
type CopyTemplateToOutputTask struct {
TaskBase
TemplatePath string
OutputPath string
ProjectName string
ClassName string
}
CopyTemplateToOutputTask ...
func (*CopyTemplateToOutputTask) Execute ¶
func (c *CopyTemplateToOutputTask) Execute() error
Execute 执行
func (*CopyTemplateToOutputTask) GetName ¶
func (c *CopyTemplateToOutputTask) GetName() string
GetName 获取name
type CreateFileFromStrTemplateTask ¶
type CreateFileFromStrTemplateTask struct {
TaskBase
SourceStr string
OutputFile string
BlockStrBegin string // Block会将SourceStr包含在内部
BlockStrEnd string
ReplaceKeyPairs map[string]string
// contains filtered or unexported fields
}
CreateFileFromStrTemplateTask 从指定的模板字符串中创建目标文件的任务
func (*CreateFileFromStrTemplateTask) Execute ¶
func (c *CreateFileFromStrTemplateTask) Execute() error
Execute 执行
func (*CreateFileFromStrTemplateTask) GetName ¶
func (c *CreateFileFromStrTemplateTask) GetName() string
GetName 获取name
type FormatDappSourceTask ¶
FormatDappSourceTask 利用Go工具,对生成出来的Go源码进行格式化
func (*FormatDappSourceTask) GetName ¶
func (f *FormatDappSourceTask) GetName() string
GetName 获取name
type GenDappCodeTask ¶
type GenDappCodeTask struct {
TaskBase
DappName string
DappDir string
ProtoFile string
PackagePath string
// contains filtered or unexported fields
}
GenDappCodeTask 通过生成好的pb.go和预先设计的模板,生成反射程序源码
type ReplaceTargetTask ¶
type ReplaceTargetTask struct {
TaskBase
OutputPath string
ProjectName string
ClassName string
ActionName string
ExecName string
}
ReplaceTargetTask 替换指定目录下所有文件的标志性文字 可替换的名字列表如下: ${PROJECTNAME} ${CLASSNAME} ${ACTIONNAME} ${EXECNAME}
func (*ReplaceTargetTask) Execute ¶
func (r *ReplaceTargetTask) Execute() error
Execute 执行具体的替换动作 1. 扫描指定的output路径 2. 打开每一个文件,根据替换规则替换内部的所有标签 3. 保存时查看文件名是否要替换,如果要则替换后保存,否则直接保存 4. 一直到所有的文件都替换完毕
type UpdateInitFileTask ¶
UpdateInitFileTask 通过扫描本地目录更新init.go文件
Click to show internal directories.
Click to hide internal directories.