Documentation ¶
Index ¶
- Constants
- func Generate(module entity.Module, dir string) error
- func GenerateEntity(rootPath string, module entity.Module) error
- func GenerateHandler(rootPath string, module entity.Module) error
- func GenerateHttp(rootPath string, module entity.Module) error
- func GenerateModule(rootPath string, module entity.Module) error
- func GenerateRepository(rootPath string, module entity.Module) error
- func GenerateRequest(rootPath string, module entity.Module) error
- func GenerateRouter(rootPath string, module entity.Module) error
- func GenerateService(rootPath string, module entity.Module) error
- func MakeDir(rootPath string) error
Constants ¶
View Source
const ( PackageEntity = "entity" PackageHandler = "handler" PackageRepository = "repository" PackageRequest = "request" PackageService = "service" PackageRouter = "router" TemplateRootPath = "templates/" GenericTemplatePath = TemplateRootPath + "generic/" GenericRequestTemplatePath = GenericTemplatePath + PackageRequest GenericEntityTemplatePath = GenericTemplatePath + PackageEntity GenericHandlerTemplatePath = GenericTemplatePath + PackageHandler GenericRepositoryTemplatePath = GenericTemplatePath + PackageRepository GenericServiceTemplatePath = GenericTemplatePath + PackageService GenericRouterTemplatePath = GenericTemplatePath + PackageRouter TemplateRequestCreateTpl = "req_create.tpl" TemplateRequestUpdateTpl = "req_update.tpl" TemplateRequestQueryTpl = "req_query.tpl" TemplateEntityTpl = "entity.tpl" TemplateHandlerTpl = "handler.tpl" TemplateRepositoryTpl = "repository.tpl" TemplateServiceTpl = "service.tpl" TemplateRouterTpl = "router.tpl" TemplateHttpTpl = "http.tpl" TemplateModuleTpl = "module.tpl" )
Variables ¶
This section is empty.
Functions ¶
func GenerateEntity ¶
GenerateEntity 生成Entity目录文件
func GenerateHandler ¶
GenerateHandler 生成Handler目录文件
func GenerateHttp ¶
GenerateHttp 生成Http请求文件
func GenerateModule ¶
GenerateModule 生成模块文件
func GenerateRepository ¶
GenerateRepository 生成Repository目录文件
func GenerateRequest ¶
GenerateRequest 生成Request目录文件
func GenerateRouter ¶
GenerateRouter 生成Router文件
func GenerateService ¶
GenerateService 生成Service目录文件
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.