Documentation ¶
Index ¶
- func GetAcmeClient(email string, privateKey string, devMode bool) *lego.Client
- func ObtainCertificateAli(client *lego.Client, domain string, accessKey string, accessSecret string) (string, string)
- func ObtainCertificateGoDaddy(client *lego.Client, domain string, accessKey string, accessSecret string) (string, string)
- func SaveCert(path, filename string, cert *certificate.Resource)
- type Account
- type AliConf
- type GodaddyConf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAcmeClient ¶
GetAcmeClient Incoming an email ,a privatekey and a Boolean value that controls the opening of the test environment When this function is started for the first time, it will initialize the account-related configuration, After initializing the configuration, It will try to obtain an account based on the private key, if it fails, it will create an account based on the private key. This account will be used during the running of the program
func ObtainCertificateAli ¶
func SaveCert ¶
func SaveCert(path, filename string, cert *certificate.Resource)
Types ¶
type Account ¶
type Account struct { Email string Registration *registration.Resource // contains filtered or unexported fields }
func (*Account) GetPrivateKey ¶
func (a *Account) GetPrivateKey() crypto.PrivateKey
GetPrivateKey returns the private RSA account key.
func (*Account) GetRegistration ¶
func (a *Account) GetRegistration() *registration.Resource
GetRegistration returns the server registration.
type AliConf ¶
type AliConf struct { Domains []string // The domain names for which you want to apply for a certificate AccessKey string // Aliyun account's AccessKey, if this is not empty, Secret is required. Secret string RAMRole string // Use Ramrole to control aliyun account SecurityToken string // Optional Path string // The path to store cert file Timeout int // Maximum waiting time for certificate application, in minutes }
type GodaddyConf ¶
Click to show internal directories.
Click to hide internal directories.