uploader

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliyunCASUploader

type AliyunCASUploader struct {
	// contains filtered or unexported fields
}

func (*AliyunCASUploader) Upload

func (u *AliyunCASUploader) Upload(ctx context.Context, certPem string, privkeyPem string) (res *UploadResult, err error)

type AliyunCASUploaderConfig

type AliyunCASUploaderConfig struct {
	AccessKeyId     string `json:"accessKeyId"`
	AccessKeySecret string `json:"accessKeySecret"`
	Region          string `json:"region"`
}

type AliyunSLBUploader added in v0.2.9

type AliyunSLBUploader struct {
	// contains filtered or unexported fields
}

func (*AliyunSLBUploader) Upload added in v0.2.9

func (u *AliyunSLBUploader) Upload(ctx context.Context, certPem string, privkeyPem string) (res *UploadResult, err error)

type AliyunSLBUploaderConfig added in v0.2.9

type AliyunSLBUploaderConfig struct {
	AccessKeyId     string `json:"accessKeyId"`
	AccessKeySecret string `json:"accessKeySecret"`
	Region          string `json:"region"`
}

type HuaweiCloudELBUploader

type HuaweiCloudELBUploader struct {
	// contains filtered or unexported fields
}

func (*HuaweiCloudELBUploader) Upload

func (u *HuaweiCloudELBUploader) Upload(ctx context.Context, certPem string, privkeyPem string) (res *UploadResult, err error)

type HuaweiCloudELBUploaderConfig

type HuaweiCloudELBUploaderConfig struct {
	AccessKeyId     string `json:"accessKeyId"`
	SecretAccessKey string `json:"secretAccessKey"`
	Region          string `json:"region"`
}

type HuaweiCloudSCMUploader

type HuaweiCloudSCMUploader struct {
	// contains filtered or unexported fields
}

func (*HuaweiCloudSCMUploader) Upload

func (u *HuaweiCloudSCMUploader) Upload(ctx context.Context, certPem string, privkeyPem string) (res *UploadResult, err error)

type HuaweiCloudSCMUploaderConfig

type HuaweiCloudSCMUploaderConfig struct {
	AccessKeyId     string `json:"accessKeyId"`
	SecretAccessKey string `json:"secretAccessKey"`
	Region          string `json:"region"`
}

type TencentCloudSSLUploader

type TencentCloudSSLUploader struct {
	// contains filtered or unexported fields
}

func (*TencentCloudSSLUploader) Upload

func (u *TencentCloudSSLUploader) Upload(ctx context.Context, certPem string, privkeyPem string) (res *UploadResult, err error)

type TencentCloudSSLUploaderConfig

type TencentCloudSSLUploaderConfig struct {
	Region    string `json:"region"`
	SecretId  string `json:"secretId"`
	SecretKey string `json:"secretKey"`
}

type UploadResult

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

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

type Uploader

type Uploader interface {
	// 上传证书。
	//
	// 入参:
	//   - ctx:上下文。
	//   - certPem:证书 PEM 内容。
	//   - privkeyPem:私钥 PEM 内容。
	//
	// 出参:
	//   - res:上传结果。
	//   - err: 错误。
	Upload(ctx context.Context, certPem string, privkeyPem string) (res *UploadResult, err error)
}

表示定义证书上传者的抽象类型接口。 云服务商通常会提供 SSL 证书管理服务,可供用户集中管理证书。 注意与 `Deployer` 区分,“上传”通常为“部署”的前置操作。

func NewAliyunCASUploader

func NewAliyunCASUploader(config *AliyunCASUploaderConfig) (Uploader, error)

func NewAliyunSLBUploader added in v0.2.9

func NewAliyunSLBUploader(config *AliyunSLBUploaderConfig) (Uploader, error)

func NewHuaweiCloudELBUploader

func NewHuaweiCloudELBUploader(config *HuaweiCloudELBUploaderConfig) (Uploader, error)

func NewHuaweiCloudSCMUploader

func NewHuaweiCloudSCMUploader(config *HuaweiCloudSCMUploaderConfig) (Uploader, error)

func NewTencentCloudSSLUploader

func NewTencentCloudSSLUploader(config *TencentCloudSSLUploaderConfig) (Uploader, error)

Jump to

Keyboard shortcuts

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