Documentation
¶
Index ¶
Constants ¶
View Source
const ( FILE_FORMAT_PEM = string(domain.CertificateFormatTypePEM) FILE_FORMAT_PFX = string(domain.CertificateFormatTypePFX) FILE_FORMAT_JKS = string(domain.CertificateFormatTypeJKS) )
View Source
const ( PFX_ENCODER_LEGACYRC2 = string(xcertpfx.EncoderNameLegacyRC2) PFX_ENCODER_LEGACYDES = string(xcertpfx.EncoderNameLegacyDES) PFX_ENCODER_MODERN2023 = string(xcertpfx.EncoderNameModern2023) PFX_ENCODER_MODERN2026 = string(xcertpfx.EncoderNameModern2026) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeployResult ¶ added in v0.4.25
type DeployResult = core.DeployerDeployResult
type Deployer ¶
type Deployer struct {
// contains filtered or unexported fields
}
func NewDeployer ¶
func NewDeployer(config *DeployerConfig) (*Deployer, error)
type DeployerConfig ¶
type DeployerConfig struct {
ServerConfig
// 跳板机配置数组。
JumpServers []ServerConfig `json:"jumpServers,omitempty"`
// 是否回退使用 SCP。
UseSCP bool `json:"useSCP,omitempty"`
// 前置命令。
PreCommand string `json:"preCommand,omitempty"`
// 后置命令。
PostCommand string `json:"postCommand,omitempty"`
// 证书格式。
FileFormat string `json:"fileFormat"`
// 私钥文件路径。
FilePathForKey string `json:"filePathForKey,omitempty"`
// 证书文件路径。
FilePathForCrt string `json:"filePathForCrt,omitempty"`
// 证书文件(仅含服务器证书)路径。
// 选填。
FilePathForCrtOnlyServer string `json:"filePathForCrtOnlyServer,omitempty"`
// 证书文件(仅含中间证书)路径。
// 选填。
FilePathForCrtOnlyIntermedia string `json:"filePathForCrtOnlyIntermedia,omitempty"`
// PFX 导出密码。
// 证书格式为 [FILE_FORMAT_PFX] 时必填。
PfxPassword string `json:"pfxPassword,omitempty"`
// PFX 编码器。
// 证书格式为 [FILE_FORMAT_PFX] 时可选。
PfxEncoder string `json:"pfxEncoder,omitempty"`
// JKS 别名。
// 证书格式为 [FILE_FORMAT_JKS] 时必填。
JksAlias string `json:"jksAlias,omitempty"`
// JKS 密钥密码。
// 证书格式为 [FILE_FORMAT_JKS] 时必填。
JksKeypass string `json:"jksKeypass,omitempty"`
// JKS 存储密码。
// 证书格式为 [FILE_FORMAT_JKS] 时必填。
JksStorepass string `json:"jksStorepass,omitempty"`
}
type ServerConfig ¶
type ServerConfig struct {
// SSH 主机。
SshHost string `json:"sshHost"`
// SSH 端口。
// 零值时默认值 22。
SshPort int32 `json:"sshPort,omitempty"`
// SSH 认证方式。
// 可取值 "none"、"password"、"key"。
// 零值时根据有无密码或私钥字段决定。
SshAuthMethod string `json:"sshAuthMethod,omitempty"`
// SSH 登录用户名。
// 零值时默认值 "root"。
SshUsername string `json:"sshUsername,omitempty"`
// SSH 登录密码。
SshPassword string `json:"sshPassword,omitempty"`
// SSH 登录私钥。
SshKey string `json:"sshKey,omitempty"`
// SSH 登录私钥口令。
SshKeyPassphrase string `json:"sshKeyPassphrase,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.