baidu

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package baidu implements Baidu Cloud certificate-center upload and CDN deployment.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider 保存百度云凭据及官方 SDK 客户端。

func New

func New(accessKey, secretKey string) (*Provider, error)

New 使用 HTTPS 控制面创建百度云 provider。

func (*Provider) DeployCertificate

func (p *Provider) DeployCertificate(ctx context.Context, certificate providers.CertificateMaterial, deploymentType deployPB.DeploymentType, resource providers.DeploymentResource) (providers.DeploymentResult, error)

DeployCertificate 上传或复用证书,更新精确 CDN 域名并回读证书 ID。

func (*Provider) DiscoverResources

func (p *Provider) DiscoverResources(ctx context.Context, deploymentType deployPB.DeploymentType) providers.ResourceCatalogResult

DiscoverResources 分页读取百度云 CDN 域名,并通过域名详情生成生命周期稳定的引用。

func (*Provider) ResolveResource

func (p *Provider) ResolveResource(ctx context.Context, deploymentType deployPB.DeploymentType, targetRef string) (providers.DeploymentResource, error)

ResolveResource 重新发现百度云 CDN 目录并按 targetRef 唯一解析资源。

func (*Provider) TestConnection

func (p *Provider) TestConnection(ctx context.Context) (bool, error)

TestConnection 验证凭据至少可以读取一页 CDN 域名目录。

func (*Provider) TestResource

func (p *Provider) TestResource(ctx context.Context, deploymentType deployPB.DeploymentType, targetRef string) error

TestResource 确认百度云 CDN 域名仍存在且运行状态允许部署。

func (*Provider) UploadCertificate

func (p *Provider) UploadCertificate(ctx context.Context, certificate providers.CertificateMaterial) error

UploadCertificate 上传或复用百度云证书托管中的同一张叶证书,并回读验收。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL