types

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2017 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Email              string
	DomainsCertificate *DomainCertificate
	Logger             logger.Interface
	PrivateKey         []byte
	Registration       *acme.RegistrationResource
}

Account is used to store lets encrypt registration info and implements the acme.User interface.

func NewAccount

func NewAccount(email string, domain *Domain, logger logger.Interface) (*Account, error)

NewAccount creates a new account for the specified email and domain.

func (Account) GetEmail

func (a Account) GetEmail() string

GetEmail returns email.

func (Account) GetPrivateKey

func (a Account) GetPrivateKey() crypto.PrivateKey

GetPrivateKey returns private key.

func (Account) GetRegistration

func (a Account) GetRegistration() *acme.RegistrationResource

GetRegistration returns lets encrypt registration resource.

type Certificate

type Certificate struct {
	Domain        string
	CertURL       string
	CertStableURL string
	PrivateKey    []byte
	Cert          []byte
}

Certificate is used to store certificate info.

type Domain

type Domain struct {
	Main string
	SANs []string
}

Domain holds a domain name with SANs.

type DomainCertificate

type DomainCertificate struct {
	Certificate *Certificate
	Domain      *Domain
	TLSCert     *tls.Certificate `json:"-"`
}

DomainCertificate contains a certificate for a domain and SANs.

func (*DomainCertificate) AddCertificate

func (dc *DomainCertificate) AddCertificate(acmeCert *Certificate, domain *Domain) error

AddCertificate add the certificate for the domain.

func (*DomainCertificate) Init

func (dc *DomainCertificate) Init() error

Init initialises the tls certificate.

func (*DomainCertificate) RenewCertificate

func (dc *DomainCertificate) RenewCertificate(acmeCert *Certificate, domain *Domain) error

RenewCertificate renew the certificate for the domain.

Jump to

Keyboard shortcuts

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