Documentation
¶
Index ¶
- func DownloadFile(ctx context.Context, httpClient *http.Client, ...) error
- func DownloadFileWithRuntime(ctx context.Context, runtime *config.Runtime, httpClient *http.Client, ...) error
- func TestProviderConnection(ctx context.Context, runtime *config.Runtime, providerName string) (bool, error)
- type DeploymentExecutionRequest
- type DeploymentExecutor
- type DeploymentHandler
- type DeploymentHandlerKey
- type DeploymentHandlerRegistry
- type DeploymentHandlerRequest
- type UpdateHandler
- type WSClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadFile ¶ added in v0.5.2
func DownloadFile(ctx context.Context, httpClient *http.Client, accessKey, downloadURL, filePath string) error
DownloadFile 公共的文件下载函数,可被所有客户端复用
Types ¶
type DeploymentExecutionRequest ¶ added in v0.7.0
type DeploymentExecutionRequest struct {
// ExecutionKind 明确指定本次执行是本地部署、云上传或云动态资源部署。
ExecutionKind deploymentExecutionKind
Provider deployPB.Provider // Provider 是 v2 部署平台。
DeploymentType deployPB.DeploymentType // DeploymentType 是 v2 部署类型。
TargetRef string // TargetRef 是客户端生成的不透明稳定资源引用。
Domain string // Domain 是证书的规范化主域名。
DownloadURL string // DownloadURL 是本地部署使用的证书下载地址。
Remark string // Remark 是证书中心上传时使用的备注。
CertificatePEM string // CertificatePEM 是资源部署使用的完整证书链。
PrivateKeyPEM string // PrivateKeyPEM 是资源部署使用的私钥。
}
DeploymentExecutionRequest 描述一次由 v2 WebSocket 下发的部署请求。
type DeploymentExecutor ¶ added in v0.7.0
type DeploymentExecutor struct {
// contains filtered or unexported fields
}
DeploymentExecutor 封装 v2 provider/type 对应的本地和云端部署逻辑。
func NewDeploymentExecutor ¶ added in v0.7.0
func NewDeploymentExecutor(downloadFile func(context.Context, string, string) error, runtime *config.Runtime) *DeploymentExecutor
NewDeploymentExecutor 使用显式运行时快照创建 v2 部署执行器。
func (*DeploymentExecutor) Execute ¶ added in v0.7.0
func (be *DeploymentExecutor) Execute(ctx context.Context, request DeploymentExecutionRequest) (providers.DeploymentResult, error)
Execute 执行一条支持 context 和结构化结果的 v2 部署请求。
type DeploymentHandler ¶ added in v0.7.0
type DeploymentHandler interface {
// Key 返回 handler 的稳定 provider/type 键。
Key() DeploymentHandlerKey
// Capability 返回不包含实时资源的能力声明。
Capability() *deployPB.DeploymentCapability
// DiscoverResources 返回脱敏的实时资源目录。
DiscoverResources(ctx context.Context) providers.ResourceCatalogResult
// Test 测试当前选择器是否可用。
Test(ctx context.Context, targetRef string) error
// Deploy 执行一次证书部署。
Deploy(ctx context.Context, request DeploymentHandlerRequest) (providers.DeploymentResult, error)
}
DeploymentHandler 定义一个 provider/type 组合的 v2 部署能力。
type DeploymentHandlerKey ¶ added in v0.7.0
type DeploymentHandlerKey struct {
Provider deployPB.Provider // Provider 是 v2 部署平台。
DeploymentType deployPB.DeploymentType // DeploymentType 是 v2 部署类型。
}
DeploymentHandlerKey 唯一标识一个 v2 部署 handler。
type DeploymentHandlerRegistry ¶ added in v0.7.0
type DeploymentHandlerRegistry struct {
// contains filtered or unexported fields
}
DeploymentHandlerRegistry 集中维护所有 v2 provider/type handler。
func NewDeploymentHandlerRegistry ¶ added in v0.7.0
func NewDeploymentHandlerRegistry(client *WSClient) (*DeploymentHandlerRegistry, error)
NewDeploymentHandlerRegistry 注册所有原生 v2 handler。
func (*DeploymentHandlerRegistry) Capabilities ¶ added in v0.7.0
func (r *DeploymentHandlerRegistry) Capabilities() []*deployPB.DeploymentCapability
Capabilities 返回所有已注册 handler 的能力声明副本。
func (*DeploymentHandlerRegistry) Lookup ¶ added in v0.7.0
func (r *DeploymentHandlerRegistry) Lookup(provider deployPB.Provider, deploymentType deployPB.DeploymentType) (DeploymentHandler, bool)
Lookup 按 provider/type 返回唯一 handler。
type DeploymentHandlerRequest ¶ added in v0.7.0
type DeploymentHandlerRequest struct {
RequestID string // RequestID 是服务端生成的请求关联标识。
TargetRef string // TargetRef 是客户端生成的不透明资源引用。
Domain string // Domain 是证书的规范化主域名。
DownloadURL string // DownloadURL 是本地部署器下载证书压缩包的地址。
CertificatePEM string // CertificatePEM 是云端部署使用的完整证书链。
PrivateKeyPEM string // PrivateKeyPEM 是云端部署使用的 PEM 私钥。
}
DeploymentHandlerRequest 描述一次 v2 证书部署所需的完整输入。
type UpdateHandler ¶ added in v0.5.2
type UpdateHandler struct {
// contains filtered or unexported fields
}
UpdateHandler 版本更新处理器
func NewUpdateHandler ¶ added in v0.5.2
func NewUpdateHandler(ctx context.Context, runtime *config.Runtime) *UpdateHandler
NewUpdateHandler 创建版本更新处理器
func (*UpdateHandler) HandleUpdate ¶ added in v0.5.2
func (uh *UpdateHandler) HandleUpdate()
HandleUpdate 处理版本更新
type WSClient ¶ added in v0.5.2
type WSClient struct {
// contains filtered or unexported fields
}
func NewWSClient ¶ added in v0.5.2
NewWSClient 使用显式运行时快照创建 WebSocket 客户端。
func (*WSClient) GetAccessKey ¶ added in v0.5.2
GetAccessKey returns the deploy authentication key.
func (*WSClient) GetClientID ¶ added in v0.5.2
GetClientID returns the unique client identifier.
func (*WSClient) GetServerURL ¶ added in v0.5.2
GetServerURL returns the deploy service URL.
func (*WSClient) SetHTTPServer ¶ added in v0.5.2
func (c *WSClient) SetHTTPServer(httpServer *server.HTTPServer)
SetHTTPServer configures the local HTTP-01 server dependency.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
baidu
Package baidu implements Baidu Cloud certificate-center upload and CDN deployment.
|
Package baidu implements Baidu Cloud certificate-center upload and CDN deployment. |
|
dogecloud
Package dogecloud implements DogeCloud certificate upload and CDN deployment.
|
Package dogecloud implements DogeCloud certificate upload and CDN deployment. |
|
huawei
Package huawei implements Huawei Cloud SCM, CDN, DCDN, OBS and ELB certificate deployment flows.
|
Package huawei implements Huawei Cloud SCM, CDN, DCDN, OBS and ELB certificate deployment flows. |
|
jdcloud
Package jdcloud implements JD Cloud certificate-center upload and CDN deployment.
|
Package jdcloud implements JD Cloud certificate-center upload and CDN deployment. |
|
lecdn
Package lecdn implements LeCDN certificate discovery and in-place CDN deployment.
|
Package lecdn implements LeCDN certificate discovery and in-place CDN deployment. |
|
qiniu
Package qiniu implements certificate upload and exact-domain certificate deployment for Qiniu CDN products.
|
Package qiniu implements certificate upload and exact-domain certificate deployment for Qiniu CDN products. |
|
volcengine
Package volcengine implements verified Volcengine certificate deployment flows.
|
Package volcengine implements verified Volcengine certificate deployment flows. |