Documentation
¶
Index ¶
- func ConfigPath() (string, error)
- func InstallOrSwitch(targetVersion string) error
- func PrintConfig() error
- func PrintVersion()
- func RunDiff(serverURL, project, from, to, serverID, token string) error
- func RunDoctor(serverURL, token, project, serverID string) error
- func RunListServers(serverURL, token string) error
- func RunListVersions(serverURL, project, token string) error
- func RunPreview(serverURL, project, version, serverID, token string) error
- func RunPull(opts PullOptions) error
- func RunPullBatch(opts PullOptions, listPath string) error
- func RunRollback(opts PullOptions, toVersion string, stepsBack int) error
- func SaveUserConfig(c UserConfig) error
- type PullOptions
- type UserConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstallOrSwitch ¶
InstallOrSwitch 从 GitHub Release 安装或切换 CLI 版本。
func RunListServers ¶
RunListServers 列出中央 server.yaml 中配置的 server_id。
func RunListVersions ¶
RunListVersions 列出项目已发布版本。
func RunPreview ¶
RunPreview 预览 server_id 在某版本下的配置变更(使用拉取 token)。
func RunPullBatch ¶
func RunPullBatch(opts PullOptions, listPath string) error
RunPullBatch 按清单批量拉取:每行 server_id[,dest_dir]。
func RunRollback ¶
func RunRollback(opts PullOptions, toVersion string, stepsBack int) error
RunRollback 部署上一已发布版本(或 --to 指定版本)。
Types ¶
type PullOptions ¶
type PullOptions struct {
ServerURL string
Project string
ServerID string
Token string
Version string
DestDir string
SkipHook bool
}
PullOptions 拉取参数。
func MergePullOptions ¶
func MergePullOptions(opts PullOptions) PullOptions
MergePullOptions 用配置文件填充 CLI 未指定的字段。
Click to show internal directories.
Click to hide internal directories.