Documentation ¶
Index ¶
Constants ¶
View Source
const ( PRODUCTION_URI = "https://acme-v01.api.letsencrypt.org/directory" STAGING_URI = "https://acme-staging.api.letsencrypt.org/directory" DATA_DIR = "/etc/letsencrypt" )
View Source
const ( CLOUDFLARE = DnsProvider("CloudFlare") DIGITALOCEAN = DnsProvider("DigitalOcean") ROUTE53 = DnsProvider("Route53") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Email string `json:"email"` Registration *lego.RegistrationResource `json:"registrations"` // contains filtered or unexported fields }
func NewAccount ¶
NewAccount creates a new or gets a stored LE account for the given email
func (*Account) GetPrivateKey ¶
func (a *Account) GetPrivateKey() crypto.PrivateKey
GetPrivateKey returns the private RSA account key.
func (*Account) GetRegistration ¶
func (a *Account) GetRegistration() *lego.RegistrationResource
GetRegistration returns the server registration
type AcmeCertificate ¶
type AcmeCertificate struct { PrivateKey []byte `json:"privateKey"` Certificate []byte `json:"certificate"` ExpiryDate time.Time `json:"expiryDate"` SerialNumber string `json:"serialnumber"` }
AcmeCertificate represents a CA issued certificate, PrivateKey and Certificate are both PEM encoded.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a Lets Encrypt client
func NewClient ¶
func NewClient(email, keyTypeStr, uri string, provider ProviderOpts) (*Client, error)
NewClient returns a new Lets Encrypt client
func (*Client) EnableDebugLogging ¶
func (c *Client) EnableDebugLogging()
EnableDebugLogging enables logging in the upstream lego library
func (*Client) GetStoredCert ¶
func (c *Client) GetStoredCert(domains []string) (bool, *AcmeCertificate)
GetStoredCert returns a locally stored certificate for the given domains
type DnsProvider ¶
type DnsProvider string
type ProviderOpts ¶
type ProviderOpts struct { Provider DnsProvider // CloudFlare credentials CloudflareEmail string CloudflareKey string // DigitalOcean credentials DoAccessToken string // AWS Route 53 credentials AwsAccessKey string AwsSecretKey string AwsRegionName string }
ProviderOpts is used to configure the DNS provider used by the Let's Encrypt client for domain validation
Click to show internal directories.
Click to hide internal directories.