refactor: clean code

This commit is contained in:
Fu Diwei 2025-05-28 10:17:33 +08:00
parent df1f216b5b
commit ddb46f9dda
8 changed files with 14 additions and 14 deletions

View File

@ -68,17 +68,17 @@ type WorkflowNodeConfigForApply struct {
Provider string `json:"provider"` // DNS 提供商
ProviderAccessId string `json:"providerAccessId"` // DNS 提供商授权记录 ID
ProviderConfig map[string]any `json:"providerConfig"` // DNS 提供商额外配置
CAProvider string `json:"caProvider,omitempty"` // CA 提供商(零值使用全局配置)
CAProvider string `json:"caProvider,omitempty"` // CA 提供商(零值使用全局配置)
CAProviderAccessId string `json:"caProviderAccessId,omitempty"` // CA 提供商授权记录 ID
CAProviderConfig map[string]any `json:"caProviderConfig,omitempty"` // CA 提供商额外配置
KeyAlgorithm string `json:"keyAlgorithm"` // 证书算法
Nameservers string `json:"nameservers,omitempty"` // DNS 服务器列表,以半角分号分隔
DnsPropagationWait int32 `json:"dnsPropagationWait,omitempty"` // DNS 传播等待时间,等同于 lego 的 `--dns-propagation-wait` 参数
DnsPropagationTimeout int32 `json:"dnsPropagationTimeout,omitempty"` // DNS 传播检查超时时间(零值取决于提供商的默认值)
DnsTTL int32 `json:"dnsTTL,omitempty"` // DNS 解析记录 TTL零值取决于提供商的默认值)
DnsPropagationTimeout int32 `json:"dnsPropagationTimeout,omitempty"` // DNS 传播检查超时时间(零值时使用提供商的默认值)
DnsTTL int32 `json:"dnsTTL,omitempty"` // DNS 解析记录 TTL零值时使用提供商的默认值)
DisableFollowCNAME bool `json:"disableFollowCNAME,omitempty"` // 是否关闭 CNAME 跟随
DisableARI bool `json:"disableARI,omitempty"` // 是否关闭 ARI
SkipBeforeExpiryDays int32 `json:"skipBeforeExpiryDays,omitempty"` // 证书到期前多少天前跳过续期(零值将使用默认值 30
SkipBeforeExpiryDays int32 `json:"skipBeforeExpiryDays,omitempty"` // 证书到期前多少天前跳过续期(零值默认值 30
}
type WorkflowNodeConfigForUpload struct {

View File

@ -29,7 +29,7 @@ type DeployerConfig struct {
// 阿里云云产品资源 ID 数组。
ResourceIds []string `json:"resourceIds"`
// 阿里云云联系人 ID 数组。
// 零值时默认使用账号下第一个联系人。
// 零值时使用账号下第一个联系人。
ContactIds []string `json:"contactIds"`
}

View File

@ -23,7 +23,7 @@ type DeployerConfig struct {
// 网站名称。
SiteName string `json:"siteName"`
// 网站 SSL 端口。
// 零值时默认 443。
// 零值时默认 443。
SitePort int32 `json:"sitePort,omitempty"`
}

View File

@ -15,7 +15,7 @@ import (
type DeployerConfig struct {
// Shell 执行环境。
// 零值时默认根据操作系统决定。
// 零值时根据操作系统决定。
ShellEnv ShellEnvType `json:"shellEnv,omitempty"`
// 前置命令。
PreCommand string `json:"preCommand,omitempty"`

View File

@ -19,10 +19,10 @@ import (
type JumpServerConfig struct {
// SSH 主机。
// 零值时默认 "localhost"。
// 零值时默认 "localhost"。
SshHost string `json:"sshHost,omitempty"`
// SSH 端口。
// 零值时默认 22。
// 零值时默认 22。
SshPort int32 `json:"sshPort,omitempty"`
// SSH 登录用户名。
SshUsername string `json:"sshUsername,omitempty"`
@ -36,10 +36,10 @@ type JumpServerConfig struct {
type DeployerConfig struct {
// SSH 主机。
// 零值时默认 "localhost"。
// 零值时默认 "localhost"。
SshHost string `json:"sshHost,omitempty"`
// SSH 端口。
// 零值时默认 22。
// 零值时默认 22。
SshPort int32 `json:"sshPort,omitempty"`
// SSH 登录用户名。
SshUsername string `json:"sshUsername,omitempty"`

View File

@ -23,7 +23,7 @@ type DeployerConfig struct {
// Webhook 回调数据application/json 或 application/x-www-form-urlencoded 格式)。
WebhookData string `json:"webhookData,omitempty"`
// 请求谓词。
// 零值时默认 "POST"。
// 零值时默认 "POST"。
Method string `json:"method,omitempty"`
// 请求标头。
Headers map[string]string `json:"headers,omitempty"`

View File

@ -12,7 +12,7 @@ import (
type NotifierConfig struct {
// Bark 服务地址。
// 零值时默认使用官方服务器。
// 零值时使用官方服务器。
ServerUrl string `json:"serverUrl"`
// Bark 设备密钥。
DeviceKey string `json:"deviceKey"`

View File

@ -22,7 +22,7 @@ type NotifierConfig struct {
// Webhook 回调数据application/json 或 application/x-www-form-urlencoded 格式)。
WebhookData string `json:"webhookData,omitempty"`
// 请求谓词。
// 零值时默认 "POST"。
// 零值时默认 "POST"。
Method string `json:"method,omitempty"`
// 请求标头。
Headers map[string]string `json:"headers,omitempty"`