Documentation ¶
Index ¶
- Constants
- func UseDNSObtain(legoClient *lego.Client, provider challenge.Provider, domains []string, ...) (*certificate.Resource, error)
- func UseHTTPObtain(legoClient *lego.Client, provider challenge.Provider, domains []string) (*certificate.Resource, error)
- type Certificate
- type Config
- type Data
- type IRegistration
- type LegoUserData
- type RegisterOptions
- type User
Constants ¶
View Source
const ( LetsencryptSSL = "letsencrypt" ZeroSSL = "zerossl" )
Variables ¶
This section is empty.
Functions ¶
func UseDNSObtain ¶
func UseHTTPObtain ¶
Types ¶
type Certificate ¶
type Certificate struct { User *User `json:"user" xml:"user"` Domain string `json:"domain" xml:"domain"` CertUrl string `json:"certUrl" xml:"certUrl"` CertStableUrl string `json:"certStableUrl" xml:"certStableUrl"` PrivateKey string `json:"privateKey" xml:"privateKey"` Certificate string `json:"certificate" xml:"certificate"` IssuerCertificate string `json:"issuerCertificate" xml:"issuerCertificate"` Csr string `json:"csr" xml:"csr"` }
func NewCertificateByResource ¶ added in v0.0.4
func NewCertificateByResource(user *User, cert *certificate.Resource) *Certificate
func RegistrationByProvider ¶
func (*Certificate) X509Certificate ¶ added in v0.0.6
func (c *Certificate) X509Certificate() (*x509.Certificate, error)
func (*Certificate) X509PrivateKey ¶ added in v0.0.6
func (c *Certificate) X509PrivateKey() (any, error)
type Config ¶
type Config struct { Email string `json:"email" yaml:"email" xml:"email"` Provider string `json:"provider" yaml:"provider" xml:"provider"` Options *RegisterOptions `json:"options" yaml:"options" xml:"options"` Nameservers string `json:"nameservers" yaml:"nameservers" xml:"nameservers"` }
type Data ¶ added in v0.0.7
type Data struct {
// contains filtered or unexported fields
}
func NewData ¶ added in v0.0.7
func NewData(email string, regi IRegistration, opt *RegisterOptions) *Data
type IRegistration ¶
type IRegistration interface { URL() string UserAgent() string Resource(lego *lego.Client, opt *RegisterOptions) (*registration.Resource, error) }
func GetRegistration ¶
func GetRegistration(name string) (IRegistration, error)
type LegoUserData ¶
type LegoUserData struct { Email string `json:"email"` PrivateKey string `json:"private_key"` Registration *registration.Resource `json:"registration"` }
type RegisterOptions ¶
type User ¶
type User struct { Email string `json:"email"` Key crypto.PrivateKey `json:"key"` Registration *registration.Resource `json:"registration"` }
func LegoClient ¶
func LegoClient(email string, regi IRegistration, opt *RegisterOptions) (*User, *lego.Client, error)
func (*User) GetPrivateKey ¶
func (u *User) GetPrivateKey() crypto.PrivateKey
func (User) GetRegistration ¶
func (u User) GetRegistration() *registration.Resource
Click to show internal directories.
Click to hide internal directories.