certmgr

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotImplemented = errors.New("not implemented function")
	ErrUnsupported    = errors.ErrUnsupported
)

Functions

This section is empty.

Types

type OperateResult added in v0.4.6

type OperateResult struct {
	ExtendedData map[string]any `json:"extendedData,omitempty"`
}

表示 SSL 证书管理操作结果的数据结构。

type Provider

type Provider interface {
	// 设置日志记录器。
	//
	// 入参:
	//   - logger:日志记录器实例。
	SetLogger(logger *slog.Logger)

	// 上传证书。
	//
	// 入参:
	//   - ctx:上下文。
	//   - certPEM:证书 PEM 内容。
	//   - privkeyPEM:私钥 PEM 内容。
	//
	// 出参:
	//   - res:上传结果。
	//   - err: 错误。
	Upload(ctx context.Context, certPEM, privkeyPEM string) (_res *UploadResult, _err error)

	// 更新证书。
	//
	// 入参:
	//   - ctx:上下文。
	//   - certIdOrName:证书 ID 或名称,即云服务商处的证书标识符。
	//   - certPEM:证书 PEM 内容。
	//   - privkeyPEM:私钥 PEM 内容。
	//
	// 出参:
	//   - res:操作结果。
	//   - err: 错误。
	Replace(ctx context.Context, certIdOrName string, certPEM, privkeyPEM string) (_res *OperateResult, _err error)
}

表示定义 SSL 证书管理器的抽象类型接口。 云服务商通常会提供 SSL 证书管理服务,可供用户集中管理证书。

type UploadResult

type UploadResult struct {
	OperateResult
	CertId       string         `json:"certId,omitempty"`
	CertName     string         `json:"certName,omitempty"`
	ExtendedData map[string]any `json:"extendedData,omitempty"`
}

表示 SSL 证书管理上传结果的数据结构,包含上传后的证书 ID、名称和其他数据。

Jump to

Keyboard shortcuts

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