service

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: MulanPSL-2.0 Imports: 6 Imported by: 0

Documentation

Index

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 Generate

func Generate(module entity.Module, dir string) error

func GenerateEntity

func GenerateEntity(rootPath string, module entity.Module) error

GenerateEntity 生成Entity目录文件

func GenerateHandler

func GenerateHandler(rootPath string, module entity.Module) error

GenerateHandler 生成Handler目录文件

func GenerateHttp

func GenerateHttp(rootPath string, module entity.Module) error

GenerateHttp 生成Http请求文件

func GenerateModule

func GenerateModule(rootPath string, module entity.Module) error

GenerateModule 生成模块文件

func GenerateRepository

func GenerateRepository(rootPath string, module entity.Module) error

GenerateRepository 生成Repository目录文件

func GenerateRequest

func GenerateRequest(rootPath string, module entity.Module) error

GenerateRequest 生成Request目录文件

func GenerateRouter

func GenerateRouter(rootPath string, module entity.Module) error

GenerateRouter 生成Router文件

func GenerateService

func GenerateService(rootPath string, module entity.Module) error

GenerateService 生成Service目录文件

func MakeDir

func MakeDir(rootPath string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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