Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator 核心生成器
func (*Generator) Generate ¶
Generate is an alias for GenerateFull that accepts only a list of services. Models and Source are left at their zero values.
func (*Generator) GenerateFull ¶ added in v1.1.0
func (g *Generator) GenerateFull(result *parser.ParseResult) error
GenerateFull 执行完整生成流程
type Options ¶
type Options struct {
TemplateFS fs.FS // 模板文件系统
OutputDir string // 输出目录
ImportPath string // 项目导入路径
ServiceName string // 服务名称
Protocols []string // 支持的协议 (http, grpc)
WithConfig bool // 是否生成配置文件
WithDocs bool // 是否生成文档(README)
WithTests bool // 是否生成测试文件
WithModel bool // 是否生成 gorm model + repository
WithGRPC bool // 是否生成 gRPC 传输层
WithDB bool // main 是否包含数据库初始化代码
DBDriver string // 数据库驱动
WithSwag bool // 是否生成 swaggo 注释
WithSkill bool // 是否生成 AI Skill (MCP server) 支持
IDLSrcPath string // IDL 源文件路径
RoutePrefix string // HTTP 路由前缀
}
Options 生成器配置选项
Click to show internal directories.
Click to hide internal directories.