Documentation
¶
Index ¶
- Constants
- Variables
- func GetPrivateKey(priKey crypto.PrivateKey, keyType KeyType) ([]byte, error)
- func GetPrivateKeyByType(keyType, sslPrivateKey string) (crypto.PrivateKey, error)
- func NewConfigWithProxy(user registration.User, accountType, customCaURL string, ...) *lego.Config
- type AcmeClient
- func (c *AcmeClient) ObtainIPSSL(ipAddress string, privKey crypto.PrivateKey) (certificate.Resource, error)
- func (c *AcmeClient) ObtainSSL(domains []string, privateKey crypto.PrivateKey) (certificate.Resource, error)
- func (c *AcmeClient) RevokeSSL(pemSSL []byte) error
- func (c *AcmeClient) UseDns(dnsType DnsType, params string, websiteSSL model.WebsiteSSL) error
- func (c *AcmeClient) UseHTTP(path string) error
- type AcmeClientOption
- type AcmeClientOptions
- type AcmeUser
- type DNSParam
- type DnsType
- type KeyType
- type ManualClient
- type RequestCertRequest
- type Resolve
Constants ¶
View Source
const ( KeyEC256 = certcrypto.EC256 KeyEC384 = certcrypto.EC384 KeyRSA2048 = certcrypto.RSA2048 KeyRSA3072 = certcrypto.RSA3072 KeyRSA4096 = certcrypto.RSA4096 )
Variables ¶
View Source
var Orders = make(map[uint]*acme.Order)
Functions ¶
func GetPrivateKey ¶
func GetPrivateKey(priKey crypto.PrivateKey, keyType KeyType) ([]byte, error)
func GetPrivateKeyByType ¶
func GetPrivateKeyByType(keyType, sslPrivateKey string) (crypto.PrivateKey, error)
func NewConfigWithProxy ¶
func NewConfigWithProxy(user registration.User, accountType, customCaURL string, systemProxy *dto.SystemProxy) *lego.Config
Types ¶
type AcmeClient ¶
func NewAcmeClient ¶
func NewAcmeClient(acmeAccount *model.WebsiteAcmeAccount, systemProxy *dto.SystemProxy) (*AcmeClient, error)
func NewRegisterClient ¶
func NewRegisterClient(acmeAccount *model.WebsiteAcmeAccount, proxy *dto.SystemProxy) (*AcmeClient, error)
func (*AcmeClient) ObtainIPSSL ¶
func (c *AcmeClient) ObtainIPSSL(ipAddress string, privKey crypto.PrivateKey) (certificate.Resource, error)
func (*AcmeClient) ObtainSSL ¶
func (c *AcmeClient) ObtainSSL(domains []string, privateKey crypto.PrivateKey) (certificate.Resource, error)
func (*AcmeClient) RevokeSSL ¶
func (c *AcmeClient) RevokeSSL(pemSSL []byte) error
func (*AcmeClient) UseDns ¶
func (c *AcmeClient) UseDns(dnsType DnsType, params string, websiteSSL model.WebsiteSSL) error
func (*AcmeClient) UseHTTP ¶
func (c *AcmeClient) UseHTTP(path string) error
type AcmeClientOption ¶
type AcmeClientOption func(*AcmeClientOptions)
type AcmeClientOptions ¶
type AcmeClientOptions struct {
SystemProxy *dto.SystemProxy
}
type AcmeUser ¶
type AcmeUser struct {
Email string
Registration *registration.Resource
Key crypto.PrivateKey
}
func (*AcmeUser) GetPrivateKey ¶
func (u *AcmeUser) GetPrivateKey() crypto.PrivateKey
func (*AcmeUser) GetRegistration ¶
func (u *AcmeUser) GetRegistration() *registration.Resource
type DNSParam ¶
type DNSParam struct {
ID string `json:"id"`
Token string `json:"token"`
AccessKey string `json:"accessKey"`
SecretKey string `json:"secretKey"`
Email string `json:"email"`
APIkey string `json:"apiKey"`
APIUser string `json:"apiUser"`
APISecret string `json:"apiSecret"`
SecretID string `json:"secretID"`
ClientID string `json:"clientID"`
Password string `json:"password"`
Region string `json:"region"`
Username string `json:"username"`
AuthID string `json:"authID"`
SubAuthID string `json:"subAuthID"`
AuthPassword string `json:"authPassword"`
Endpoint string `json:"endpoint"`
AccessToken string `json:"accessToken"`
BaseURL string `json:"baseURL"`
}
type DnsType ¶
type DnsType string
const ( DnsPod DnsType = "DnsPod" AliYun DnsType = "AliYun" AliESA DnsType = "AliESA" AWSRoute53 DnsType = "AWSRoute53" CloudFlare DnsType = "CloudFlare" CloudDns DnsType = "CloudDns" NameSilo DnsType = "NameSilo" NameCheap DnsType = "NameCheap" NameCom DnsType = "NameCom" Godaddy DnsType = "Godaddy" TencentCloud DnsType = "TencentCloud" RainYun DnsType = "RainYun" Volcengine DnsType = "Volcengine" HuaweiCloud DnsType = "HuaweiCloud" FreeMyIP DnsType = "FreeMyIP" Vercel DnsType = "Vercel" Spaceship DnsType = "Spaceship" WestCN DnsType = "WestCN" ClouDNS DnsType = "ClouDNS" RegRu DnsType = "RegRu" Dynu DnsType = "Dynu" BaiduCloud DnsType = "BaiduCloud" Ovh DnsType = "Ovh" AcmeDNS DnsType = "AcmeDNS" )
type KeyType ¶
type KeyType = certcrypto.KeyType
type ManualClient ¶
type ManualClient struct {
// contains filtered or unexported fields
}
func NewCustomAcmeClient ¶
func NewCustomAcmeClient(acmeAccount *model.WebsiteAcmeAccount, logger *log.Logger) (*ManualClient, error)
func (*ManualClient) GetDNSResolve ¶
func (c *ManualClient) GetDNSResolve(ctx context.Context, websiteSSL *model.WebsiteSSL) (map[string]Resolve, error)
func (*ManualClient) RequestCertificate ¶
func (c *ManualClient) RequestCertificate(ctx context.Context, websiteSSL *model.WebsiteSSL) (certificate.Resource, error)
type RequestCertRequest ¶
type RequestCertRequest struct {
WebsiteSSL *model.WebsiteSSL
}
Click to show internal directories.
Click to hide internal directories.