Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Extractor ¶
type Extractor struct {
// contains filtered or unexported fields
}
Extractor 从源服务提取模块到目标服务
type Options ¶
type Options struct {
// 项目根路径
RootPath string
// 项目模块路径 (go.mod 中的 module)
ModulePath string
// 项目名称 (从 module path 提取的最后一段)
ProjectName string
// 源服务名
SourceService string
// 目标服务名
TargetService string
// 要提取的模型名列表 (单数形式, 如 "role", "user")
Models []string
// ORM 类型: "ent" | "gorm"
OrmType string
// 服务器类型 (用于创建新服务时): ["grpc"], ["grpc","rest"], ...
Servers []string
// 数据库客户端类型 (用于创建新服务时): ["ent"], ["gorm"], ...
DbClients []string
// 是否保留源文件(默认 false = 删除)
KeepSource bool
}
Options 提取选项
Click to show internal directories.
Click to hide internal directories.