Documentation
¶
Index ¶
- func BusinessTemplate(name string) string
- func CmdExtensionTemplate(name, extType, moduleName string) string
- func CmdGinTemplate(name, extType, moduleName string) string
- func CmdMainTemplate(name, extType, moduleName string) string
- func CmdRestTemplate(name, extType, moduleName string) string
- func CmdServerTemplate(name, extType, moduleName string) string
- func CoreTemplate(name string) string
- func DataTemplate(name, extType string) string
- func DataTemplateWithEnt(name, extType string) string
- func DataTemplateWithGorm(name, extType string) string
- func DataTemplateWithMongo(name, extType string) string
- func ExtTestTemplate(name, extType, moduleName string) string
- func GeneraterTemplate(name, extType, moduleName string) string
- func HandlerTemplate(name, extType, moduleName string) string
- func HandlerTestTemplate(name, extType, moduleName string) string
- func PluginTemplate(name string) string
- func RepositoryTemplate(name, extType, moduleName string) string
- func SchemaTemplate() string
- func ServiceTemplate(name, extType, moduleName string) string
- func ServiceTestTemplate(name, extType, moduleName string) string
- func StandaloneConfigTemplate(name, moduleName string) string
- func StandaloneGinTemplate(name, moduleName string) string
- func StandaloneHandlerTemplate(name, moduleName string) string
- func StandaloneHandlerTestTemplate(name, moduleName string) string
- func StandaloneMainTemplate(name, moduleName string) string
- func StandaloneModelTemplate(name, moduleName string) string
- func StandaloneRepositoryTemplate(name, moduleName string, useMongo, useEnt, useGorm bool) string
- func StandaloneRestTemplate(name, moduleName string) string
- func StandaloneServerTemplate(name, moduleName string) string
- func StandaloneServiceTemplate(name, moduleName string) string
- func StandaloneServiceTestTemplate(name, moduleName string) string
- func StructsTemplate() string
- type Data
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BusinessTemplate ¶
func CmdExtensionTemplate ¶
CmdExtensionTemplate generates the extension.go file for the provider directory
func CmdGinTemplate ¶
CmdGinTemplate generates the gin.go file for the provider directory
func CmdMainTemplate ¶
CmdMainTemplate generates the main.go file for the cmd directory
func CmdRestTemplate ¶
CmdRestTemplate generates the rest.go file for the provider directory
func CmdServerTemplate ¶
CmdServerTemplate generates the server.go file for the provider directory
func CoreTemplate ¶
func DataTemplate ¶
func DataTemplateWithEnt ¶
func DataTemplateWithGorm ¶
func DataTemplateWithMongo ¶
func ExtTestTemplate ¶
ExtTestTemplate generates extension test template
func GeneraterTemplate ¶
func HandlerTemplate ¶
func HandlerTestTemplate ¶
HandlerTestTemplate generates handler test template
func PluginTemplate ¶
func RepositoryTemplate ¶
func SchemaTemplate ¶
func SchemaTemplate() string
func ServiceTemplate ¶
func ServiceTestTemplate ¶
ServiceTestTemplate generates service test template
func StandaloneConfigTemplate ¶
StandaloneConfigTemplate generates the config.go file for standalone applications
func StandaloneGinTemplate ¶
StandaloneGinTemplate generates the gin.go file for standalone applications
func StandaloneHandlerTemplate ¶
StandaloneHandlerTemplate generates the handler.go file for standalone applications
func StandaloneHandlerTestTemplate ¶
StandaloneHandlerTestTemplate generates the handler_test.go file for standalone applications
func StandaloneMainTemplate ¶
StandaloneMainTemplate generates the main.go file for standalone applications
func StandaloneModelTemplate ¶
StandaloneModelTemplate generates the model.go file for standalone applications
func StandaloneRepositoryTemplate ¶
StandaloneRepositoryTemplate generates the repository.go file for standalone applications
func StandaloneRestTemplate ¶
StandaloneRestTemplate generates the rest.go file for standalone applications
func StandaloneServerTemplate ¶
StandaloneServerTemplate generates the server.go file for standalone applications
func StandaloneServiceTemplate ¶
StandaloneServiceTemplate generates the service.go file for standalone applications
func StandaloneServiceTestTemplate ¶
StandaloneServiceTestTemplate generates the service_test.go file for standalone applications
func StructsTemplate ¶
func StructsTemplate() string
Types ¶
type Data ¶
type Data struct {
Name string // Extension name
Type string // Extension type (core/business/plugin/custom)
CustomDir string // Custom directory name, if type is custom
ModuleName string // Go module name
UseMongo bool // Whether to use MongoDB
UseEnt bool // Whether to use Ent ORM
UseGorm bool // Whether to use GORM
WithCmd bool // Whether to generate cmd directory with main.go
WithTest bool // Whether to generate test files
Standalone bool // Whether to generate as standalone app without extension structure
Group string // Optional group name
ExtType string // Extension type in belongs domain path (core/business/plugin/custom)
PackagePath string // Full package path
}
Data represents template data structure