Documentation
¶
Index ¶
- Constants
- Variables
- func GetPrivateKey(priKey crypto.PrivateKey, keyType KeyType) ([]byte, error)
- func GetPrivateKeyByType(keyType, sslPrivateKey string) (crypto.Signer, error)
- func NewConfigWithProxy(user registration.User, accountType, customCaURL string, ...) *lego.Config
- type AcmeClient
- func NewAcmeClient(acmeAccount *model.WebsiteAcmeAccount, systemProxy *dto.SystemProxy) (*AcmeClient, error)
- func NewAcmeClientWithContext(ctx context.Context, acmeAccount *model.WebsiteAcmeAccount, ...) (*AcmeClient, error)
- func NewRegisterClient(acmeAccount *model.WebsiteAcmeAccount, proxy *dto.SystemProxy) (*AcmeClient, error)
- func NewRegisterClientWithContext(ctx context.Context, acmeAccount *model.WebsiteAcmeAccount, ...) (*AcmeClient, error)
- func (c *AcmeClient) ObtainIPSSL(ctx context.Context, ipAddress string, privKey crypto.Signer) (certificate.Resource, error)
- func (c *AcmeClient) ObtainSSL(ctx context.Context, domains []string, privateKey crypto.Signer) (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 ErrAcmeAccountURLMissing = errors.New("acme account url is empty")
Functions ¶
func GetPrivateKey ¶
func GetPrivateKey(priKey crypto.PrivateKey, keyType KeyType) ([]byte, error)
func GetPrivateKeyByType ¶
GetPrivateKeyByType returns a crypto.Signer (lego v5 changed from crypto.PrivateKey).
func NewConfigWithProxy ¶
func NewConfigWithProxy(user registration.User, accountType, customCaURL string, systemProxy *dto.SystemProxy) *lego.Config
Types ¶
type AcmeClient ¶
type AcmeClient struct {
Config *lego.Config
Client *lego.Client
User *AcmeUser
ProxyURL string
// contains filtered or unexported fields
}
func NewAcmeClient ¶
func NewAcmeClient(acmeAccount *model.WebsiteAcmeAccount, systemProxy *dto.SystemProxy) (*AcmeClient, error)
func NewAcmeClientWithContext ¶
func NewAcmeClientWithContext(ctx context.Context, acmeAccount *model.WebsiteAcmeAccount, systemProxy *dto.SystemProxy) (*AcmeClient, error)
func NewRegisterClient ¶
func NewRegisterClient(acmeAccount *model.WebsiteAcmeAccount, proxy *dto.SystemProxy) (*AcmeClient, error)
func NewRegisterClientWithContext ¶
func NewRegisterClientWithContext(ctx context.Context, acmeAccount *model.WebsiteAcmeAccount, proxy *dto.SystemProxy) (*AcmeClient, error)
func (*AcmeClient) ObtainIPSSL ¶
func (c *AcmeClient) ObtainIPSSL(ctx context.Context, ipAddress string, privKey crypto.Signer) (certificate.Resource, error)
func (*AcmeClient) ObtainSSL ¶
func (c *AcmeClient) ObtainSSL(ctx context.Context, domains []string, privateKey crypto.Signer) (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 *legoacme.ExtendedAccount
Key crypto.Signer
}
AcmeUser implements registration.User. Key is crypto.Signer (lego v5 changed the field type from crypto.PrivateKey to crypto.Signer).
func (*AcmeUser) GetPrivateKey ¶
func (*AcmeUser) GetRegistration ¶
func (u *AcmeUser) GetRegistration() *legoacme.ExtendedAccount
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"`
APIPrefix string `json:"apiPrefix"`
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 ( AcmeDNS DnsType = "AcmeDNS" AliYun DnsType = "AliYun" AliESA DnsType = "AliESA" BaiduCloud DnsType = "BaiduCloud" CloudDns DnsType = "CloudDns" CloudFlare DnsType = "CloudFlare" ClouDNS DnsType = "ClouDNS" Dynadot DnsType = "Dynadot" Dynu DnsType = "Dynu" FreeMyIP DnsType = "FreeMyIP" Godaddy DnsType = "Godaddy" HuaweiCloud DnsType = "HuaweiCloud" Ionos DnsType = "Ionos" IonosCloud DnsType = "IonosCloud" NameCheap DnsType = "NameCheap" NameCom DnsType = "NameCom" NameSilo DnsType = "NameSilo" Ovh DnsType = "Ovh" PorkBun DnsType = "PorkBun" RainYun DnsType = "RainYun" RegRu DnsType = "RegRu" AWSRoute53 DnsType = "AWSRoute53" Spaceship DnsType = "Spaceship" Technitium DnsType = "Technitium" TencentCloud DnsType = "TencentCloud" Vercel DnsType = "Vercel" Volcengine DnsType = "Volcengine" WestCN DnsType = "WestCN" )
type KeyType ¶
type KeyType = certcrypto.KeyType
type ManualClient ¶
type ManualClient struct {
// contains filtered or unexported fields
}
func NewCustomAcmeClient ¶
func NewCustomAcmeClient(acmeAccount *model.WebsiteAcmeAccount, proxy *dto.SystemProxy, 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.