Documentation ¶
Index ¶
- Constants
- type Account
- type AcmeCertificate
- type ApiVersion
- type Client
- func (c *Client) ApiVersion() string
- func (c *Client) CertPath(certName string) string
- func (c *Client) ConfigPath() string
- func (c *Client) EnableLogs()
- func (c *Client) GetStoredCertificate(certName string, domains []string) (bool, *AcmeCertificate)
- func (c *Client) Issue(certName string, domains []string) (*AcmeCertificate, error)
- func (c *Client) ProviderName() string
- func (c *Client) Renew(certName string) (*AcmeCertificate, error)
- type KeyType
- type Provider
- type ProviderFactory
- type ProviderOpts
Constants ¶
const ( StorageDir = "/etc/letsencrypt" ProductionApiUri = "https://acme-v02.api.letsencrypt.org/directory" StagingApiUri = "https://acme-staging.api.letsencrypt.org/directory" )
const ( AURORA = Provider("Aurora") AZURE = Provider("Azure") CLOUDFLARE = Provider("CloudFlare") DIGITALOCEAN = Provider("DigitalOcean") DNSIMPLE = Provider("DNSimple") DYN = Provider("Dyn") GANDI = Provider("Gandi") NS1 = Provider("NS1") OVH = Provider("Ovh") ROUTE53 = Provider("Route53") VULTR = Provider("Vultr") HTTP = Provider("HTTP") )
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 { lego.CertificateResource DnsNames string `json:"dnsNames"` ExpiryDate time.Time `json:"expiryDate"` SerialNumber string `json:"serialNumber"` }
AcmeCertificate represents a CA issued certificate, PrivateKey and Certificate are both PEM encoded.
Anonymous fields: PrivateKey []byte Certificate []byte Domain string
type ApiVersion ¶ added in v0.2.6
type ApiVersion string
const ( Production ApiVersion = "Production" Sandbox ApiVersion = "Sandbox" )
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a Lets Encrypt client
func NewClient ¶
func NewClient(email string, kt KeyType, apiVer ApiVersion, dnsResolvers []string, provider ProviderOpts) (*Client, error)
NewClient returns a new Lets Encrypt client
func (*Client) ApiVersion ¶ added in v0.4.0
func (*Client) ConfigPath ¶ added in v0.2.6
func (*Client) EnableLogs ¶ added in v0.5.0
func (c *Client) EnableLogs()
EnableLogs prints logs from the upstream lego library
func (*Client) GetStoredCertificate ¶ added in v0.2.6
func (c *Client) GetStoredCertificate(certName string, domains []string) (bool, *AcmeCertificate)
GetStoredCertificate returns the locally stored certificate for the given domains
func (*Client) Issue ¶
func (c *Client) Issue(certName string, domains []string) (*AcmeCertificate, error)
Issue obtains a new SAN certificate from the Lets Encrypt CA
func (*Client) ProviderName ¶ added in v0.4.0
type ProviderFactory ¶ added in v0.4.0
type ProviderFactory struct {
// contains filtered or unexported fields
}
type ProviderOpts ¶
type ProviderOpts struct { Provider Provider // Aurora credentials AuroraUserId string AuroraKey string AuroraEndpoint string // AWS Route 53 credentials AwsAccessKey string AwsSecretKey string // Azure credentials AzureClientId string AzureClientSecret string AzureSubscriptionId string AzureTenantId string AzureResourceGroup string // CloudFlare credentials CloudflareEmail string CloudflareKey string // DigitalOcean credentials DoAccessToken string // DNSimple credentials DNSimpleEmail string DNSimpleKey string // Dyn credentials DynCustomerName string DynUserName string DynPassword string // Gandi credentials GandiApiKey string // NS1 credentials NS1ApiKey string // OVH credentials OvhApplicationKey string OvhApplicationSecret string OvhConsumerKey string // Vultr credentials VultrApiKey string }
ProviderOpts is used to configure the DNS provider used by the Let's Encrypt client for domain validation