Documentation
¶
Overview ¶
Package scaffold 实现 appkit new / appkit dev: 生成域仓库与组合仓库骨架(embed 模板 + text/template), 以及本地多仓联调的 go.work 维护。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
// Name 是域名/系统名,须匹配 ^[a-z][a-z0-9]*$(业务包名 = Postgres schema)。
Name string
// Module 是生成仓库的 module path,空则默认 github.com/forgeplex/<name>。
Module string
// Dir 是输出目录,空则默认 ./<name>。目录已存在且非空时报错。
Dir string
// AppkitVersion 是写进 go.mod 的 appkit 版本(取 cli.Version());
// "(devel)" 表示源码构建:go.mod 不 require appkit(对不存在版本的
// require 会让 go 命令去代理拉取而失败),改由 appkit dev 的 go.work 提供。
AppkitVersion string
// Partitioned 生成「分区域域」形态(仅 domain):一套代码、N 份数据分区,
// 迁移与查询全部无 schema 前缀,落位由组合根注入的分区映射(租户 → schema)
// 经事务级 search_path 路由确定。分区映射的定义放组合根自己的配置文件。
Partitioned bool
}
Options 是 appkit new 的输入。
Click to show internal directories.
Click to hide internal directories.