acme

package
v0.0.0-...-a8fda15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	IssuerCertificate []byte `json:"issuer-certificate"`
	Certificate       []byte `json:"certificate"`
	PrivateKey        []byte `json:"private-key"`
}

Certificate holds all requirements to configure the full chain certificate

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a let's encrypt client

func New

func New(logger *log.Logger, email, dnsProvider, caServer string, cache cache.Cache) (*Client, error)

New creates a new acme client

func (*Client) GetCertificate

func (c *Client) GetCertificate(domain ...string) (*Certificate, error)

GetCertificate returns the all certificates and keys for future use (dump as JSON, ...)

type User

type User struct {
	Email        string
	Registration *acme.RegistrationResource
	PrivateKey   crypto.PrivateKey
	// contains filtered or unexported fields
}

User implements the lego acme user interface to use the acme challenges

func NewUser

func NewUser(email string, cache cache.Cache) (*User, error)

NewUser creates a new user with a random private key

func (*User) GetEmail

func (u *User) GetEmail() string

GetEmail returns email

func (*User) GetPrivateKey

func (u *User) GetPrivateKey() crypto.PrivateKey

GetPrivateKey returns the user private key

func (*User) GetRegistration

func (u *User) GetRegistration() *acme.RegistrationResource

GetRegistration returns lets encrypt registration resource

func (*User) IsRegistered

func (u *User) IsRegistered() bool

IsRegistered returns true when the user registration is already saved

func (*User) SetRegistration

func (u *User) SetRegistration(reg *acme.RegistrationResource) error

SetRegistration sets the user lets encrypt registration and caches it

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL