certimate/pkg/core/deployer/provider.go
2025-11-16 00:29:27 +08:00

33 lines
722 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package deployer
import (
"context"
"log/slog"
)
// 表示定义 SSL 证书部署器的抽象类型接口。
type Provider interface {
// 设置日志记录器。
//
// 入参:
// - logger日志记录器实例。
SetLogger(logger *slog.Logger)
// 部署证书。
//
// 入参:
// - ctx上下文。
// - certPEM证书 PEM 内容。
// - privkeyPEM私钥 PEM 内容。
//
// 出参:
// - res部署结果。
// - err: 错误。
Deploy(ctx context.Context, certPEM string, privkeyPEM string) (_res *DeployResult, _err error)
}
// 表示 SSL 证书部署结果的数据结构。
type DeployResult struct {
ExtendedData map[string]any `json:"extendedData,omitempty"`
}