deploy

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 5 Imported by: 1 module, 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 deploy 提供官方部署 helper 内部的部署目标注册表。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Has

func Has(name string) bool

Has 判断部署器是否已注册(含别名)。

func Register

func Register(p Deployer)

Register 注册内置部署器。重复的 ID 或别名会直接 panic。

func ResetForTest

func ResetForTest()

ResetForTest 清空注册表,仅供测试使用。

Types

type Certificate

type Certificate = protocol.Certificate

Certificate 是交给插件的最小证书材料,与协议结构保持一致。

type Deployer

type Deployer interface {
	// ID 是部署类型的规范标识,必须与主程序数据库中的 deploy_accounts.type 一致。
	ID() string
	// Aliases 是兼容别名。
	Aliases() []string
	// Deploy 执行一次证书部署。
	Deploy(ctx context.Context, req Request) error
}

Deployer 是部署目标的统一接口。

func List

func List() []Deployer

List 返回按 ID 排序的全部部署器。

func Lookup

func Lookup(name string) (Deployer, bool)

Lookup 按 ID 或别名查找部署器。

type DuplicateError

type DuplicateError struct{ ID string }

DuplicateError 表示部署器 ID 或别名冲突。

func (*DuplicateError) Error

func (e *DuplicateError) Error() string

type Request

type Request struct {
	Auth        map[string]string
	Config      map[string]string
	Certificate Certificate
}

Request 是一次部署请求。

Directories

Path Synopsis
providers
aliyuncdn
Package aliyuncdn 调用阿里云 CDN API 更新域名证书。
Package aliyuncdn 调用阿里云 CDN API 更新域名证书。
ftp
qiniu
Package qiniu 通过七牛云 API 上传证书并绑定 CDN 或 Kodo 域名。
Package qiniu 通过七牛云 API 上传证书并绑定 CDN 或 Kodo 域名。
webhook
Package webhook 通过 HTTP POST 把证书内容推送到用户配置的接口。
Package webhook 通过 HTTP POST 把证书内容推送到用户配置的接口。
Package util 提供部署插件实现共用的配置与证书转换工具。
Package util 提供部署插件实现共用的配置与证书转换工具。

Jump to

Keyboard shortcuts

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