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

@@ -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"`