You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
817 B
Go
44 lines
817 B
Go
6 months ago
|
package acme
|
||
|
|
||
|
import (
|
||
|
"crypto"
|
||
|
"github.com/go-acme/lego/v4/registration"
|
||
|
)
|
||
|
|
||
|
type DnsProvider struct {
|
||
|
Name string
|
||
|
Type string
|
||
|
KeyID string
|
||
|
KeySecret string
|
||
|
}
|
||
|
|
||
|
type CertReq struct {
|
||
|
Domains []string
|
||
|
Type string
|
||
|
PrivderName string
|
||
|
KeyType string
|
||
|
SaveFolder string
|
||
|
SaveName string
|
||
|
}
|
||
|
|
||
|
// You'll need a user or account type that implements acme.User
|
||
|
type Acme struct {
|
||
|
Email string
|
||
|
KeyPath string
|
||
|
SaveFolder string
|
||
|
CertReqs map[string]CertReq
|
||
|
DnsPrivders map[string]DnsProvider
|
||
|
Registration *registration.Resource
|
||
|
key crypto.PrivateKey
|
||
|
}
|
||
|
|
||
|
func (u *Acme) GetEmail() string {
|
||
|
return u.Email
|
||
|
}
|
||
|
func (u Acme) GetRegistration() *registration.Resource {
|
||
|
return u.Registration
|
||
|
}
|
||
|
func (u *Acme) GetPrivateKey() crypto.PrivateKey {
|
||
|
return u.key
|
||
|
}
|