Documentation ¶
Index ¶
- Variables
- type Account
- func (a *Account) GenerateKey() error
- func (a *Account) GetEmail() string
- func (a *Account) GetPrivateKey() crypto.PrivateKey
- func (a *Account) GetRegistration() *acme.RegistrationResource
- func (a *Account) Load(c client.Client) error
- func (a *Account) LoadKey(c client.Client) error
- func (a *Account) LoadRegistration(c client.Client) error
- func (a *Account) Register(c *acme.Client) error
- func (a *Account) Save(c client.Client) error
- type Cert
- func (c *Cert) CertPath() string
- func (c *Cert) Expiration() (time.Time, error)
- func (c *Cert) ExpiresIn() (time.Duration, error)
- func (c *Cert) KeyPath() string
- func (c *Cert) MetaPath() string
- func (c *Cert) PEM() []byte
- func (c *Cert) PemPath() string
- func (c *Cert) Reload(ec client.Client) error
- func (c *Cert) Renew(ac *Client, bundle bool) error
- func (c *Cert) Save(ec client.Client, pem bool) error
- type Client
Constants ¶
This section is empty.
Variables ¶
var ( // ErrUnknowKeyType is returns when the private key stored in etcd is of an // unknown type. ErrUnknowKeyType = errors.New("unknown private key type") // ErrAccountNotExist is returned if the load did not find an account. ErrAccountNotExist = errors.New("account does not exist") // ErrKeyAlreadyExists is returned when GenerateKey() is called and the key // already exists ErrKeyAlreadyExists = errors.New("key already exists") // ErrAlreadyRegistered is returned when Register() is called and the account // is already registered. ErrAlreadyRegistered = errors.New("account already registered") )
var ( // ErrAddressInvalid is returned by New() when the address is not a valid // host:port. ErrAddressInvalid = errors.New("the address should be host:port") )
var ( // ErrMustAcceptTOS is returned of the TOS was not accepted and `acceptTOS` // is false. ErrMustAcceptTOS = errors.New("you must accept Let's encrypt terms of service") )
var ErrNoPemForCSR = errors.New("unable to save pem without private key; are you using a CSR?")
ErrNoPemForCSR is returned when there is no private key.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
Account implements acme.Account
func NewAccount ¶
NewAccount returns a new user with the email provided
func (*Account) GenerateKey ¶
GenerateKey generates a new key.
func (*Account) GetPrivateKey ¶
func (a *Account) GetPrivateKey() crypto.PrivateKey
GetPrivateKey returns the private RSA account key.
func (*Account) GetRegistration ¶
func (a *Account) GetRegistration() *acme.RegistrationResource
GetRegistration returns the server registration
func (*Account) LoadRegistration ¶
LoadRegistration loads the registration from etcd.
type Cert ¶
type Cert struct { Domains []string CSR *x509.CertificateRequest Cert acme.CertificateResource }
Cert represents a domain certificate
func (*Cert) CertPath ¶
CertPath returns the path where the CRT of this certificate is store on etcd.
func (*Cert) Expiration ¶
Expiration returns the certificate's expiration date and time.
func (*Cert) KeyPath ¶
KeyPath returns the path where the PrivateKey of this certificate is store on etcd.
func (*Cert) MetaPath ¶
MetaPath returns the path where the metadata of this certificate is store on etcd.
type Client ¶
Client represents the legoetcd Client
func New ¶
func New(ec client.Client, acmeServer, email string, keyType acme.KeyType, dns, webRoot, httpAddr, tlsAddr string) (*Client, error)
New returns a new ACME client configured with the challenge.