{"modulePath":"github.com/https-cert/deploy","version":"v0.7.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package lecdn\n\nPackage lecdn implements LeCDN certificate discovery and in-place CDN deployment.\n\n## Types\n\n```go\ntype HTTPClient interface {\n\tDo(request *http.Request) (*http.Response, error)\n}\n```\nHTTPClient 是 LeCDN provider 使用的最小 HTTP 客户端接口。\n\n```go\ntype Options struct {\n\tHTTPClient   HTTPClient    // HTTPClient 执行 LeCDN 控制面请求。\n\tPollInterval time.Duration // PollInterval 是同步状态轮询间隔。\n\tSyncTimeout  time.Duration // SyncTimeout 是单个站点同步等待上限。\n}\n```\nOptions 提供测试可替换的 HTTP 客户端和同步轮询参数。\n\n```go\ntype Provider struct {\n\t// contains filtered or unexported fields\n}\n```\nProvider 保存 LeCDN API Token 和控制面访问参数。\n\n```go\nfunc New(apiBaseURL, apiToken string) *Provider\n```\nNew 创建使用生产控制面参数的 LeCDN provider。\n\n```go\nfunc NewWithOptions(apiBaseURL, apiToken string, options *Options) *Provider\n```\nNewWithOptions 创建支持注入 HTTP 客户端和轮询参数的 LeCDN provider。\n\n```go\nfunc (p *Provider) DeployCertificate(ctx context.Context, certificate providers.CertificateMaterial, deploymentType deployPB.DeploymentType, resource providers.DeploymentResource) (providers.DeploymentResult, error)\n```\nDeployCertificate 原地更新 certificate\\_id，回读证书后同步全部引用站点。\n\n```go\nfunc (p *Provider) DiscoverResources(ctx context.Context, deploymentType deployPB.DeploymentType) providers.ResourceCatalogResult\n```\nDiscoverResources 按 certificate\\_id 聚合全部已启用的站点域名引用。\n\n```go\nfunc (p *Provider) ResolveResource(ctx context.Context, deploymentType deployPB.DeploymentType, targetRef string) (providers.DeploymentResource, error)\n```\nResolveResource 重新发现资源并按不透明 targetRef 唯一解析。\n\n```go\nfunc (p *Provider) TestConnection(ctx context.Context) (bool, error)\n```\nTestConnection 验证 API Token 可以读取 LeCDN 证书目录。\n\n```go\nfunc (p *Provider) TestResource(ctx context.Context, deploymentType deployPB.DeploymentType, targetRef string) error\n```\nTestResource 确认证书引用仍存在且证书详情可读取。\n\n","path":"github.com/https-cert/deploy/internal/client/providers/lecdn","name":"lecdn","synopsis":"Package lecdn implements LeCDN certificate discovery and in-place CDN deployment.","isRedistributable":true}
