providers

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: Apache-2.0 Imports: 9 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProviderHandler

type ProviderHandler interface {
	// 测试连接
	TestConnection() (bool, error)

	// 上传证书
	UploadCertificate(name, cert, key string) error

	// 部署到 对象存储
	DeployToOSS(certID string, domain string) (string, error)

	// 部署到 CDN
	DeployToCDN(certID string, domain string) (string, error)

	// 部署到 DCND
	DeployToDCND(certID string, domain string) (string, error)
}

ProviderHandler 定义了所有提供商的通用接口

type RequestOptions

type RequestOptions struct {
	Method  string            // HTTP 请求方法
	Path    string            // API 路径 (例如: "/v1/resource")
	Query   map[string]string // URL 查询参数
	Body    any               // 请求体 (将被 JSON 编码)
	Headers map[string]string // 自定义请求头
	Timeout time.Duration     // 请求超时时间 (默认: 30s)
	BaseURL string            // 覆盖默认 Base URL
}

RequestOptions HTTP 请求配置选项

type Response

type Response struct {
	StatusCode int            // HTTP 状态码
	Body       map[string]any // 响应体
	Headers    http.Header    // 响应头
}

Response HTTP 响应

func Execute

func Execute(opts RequestOptions) (*Response, error)

Execute 执行 RESTful HTTP 请求

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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