Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrZapFileDomainMismatched is returned when given domain does not match data in file. ErrZapFileDomainMismatched = errors.New("ZapFile domain-account.Domain does not match expected") // ErrZapFileHasNoAcctData is returned when a zapfile contains no acct data for a domain. ErrZapFileHasNoAcctData = WithZapCorrupted(errors.New("ZapFile contains no domain-account data")) // ErrZapFileHasNoPKeyData is returned when a zapfile contains no private key data for a domain. ErrZapFileHasNoPKeyData = WithZapCorrupted(errors.New("ZapFile contains no domain-private-key data")) // ErrZapFileHasNoUserRegistrationData is returned when a zapfile contains no user registration data for a domain. ErrZapFileHasNoUserRegistrationData = WithZapCorrupted(errors.New("ZapFile contains no domain-user-registration-data data")) // ErrZapFileHasNoCertificate is returned when a zapfile contains no domain certificate for a domain. ErrZapFileHasNoCertificate = WithZapCorrupted(errors.New("ZapFile contains no domain-certificate data")) // ErrZapFileHasNoIssuerCertificate is returned when a zapfile contains no domain issuer certificate // from the CA for a domain. ErrZapFileHasNoIssuerCertificate = WithZapCorrupted(errors.New("ZapFile contains no domain-issuer-certificate data")) // ErrZapFileHasNoCertificateRequest is returned when a zapfile contains no domain certificate // request or CRS, that was used to generate the domain certificate for a domain. ErrZapFileHasNoCertificateRequest = WithZapCorrupted(errors.New("ZapFile contains no domain-certificate-request data")) )
Functions ¶
func GetDomainSignature ¶
GetDomainSignature returns a signature suited for giving email address and domain name.
func GetUserSignature ¶
GetUserSignature returns a signature suited for giving email address.
Types ¶
type AccountZapDecoder ¶
type AccountZapDecoder struct{}
AccountZapDecoder implements a decoder which transforms a provided zap file track content into a tlsfs.Account.
type AccountZapEncoder ¶
type AccountZapEncoder struct{}
AccountZapEncoder implements a tls.ZapFile encoder which transforms a giving tls.TLSDomainCertificate into a ZapFile.
type Registration ¶
type Registration interface {
GetRegistration() *acme.RegistrationResource
}
Registration defines an interface that exposes method to retrieve an associated acme.RegistrationResource.
type TLSDomainZapDecoder ¶
type TLSDomainZapDecoder struct{}
TLSDomainZapDecoder implements a decoder which transforms a provided zap file track content into a tlsfs.TLSDomainCertificate.
func (TLSDomainZapDecoder) Decode ¶
func (enc TLSDomainZapDecoder) Decode(zapFile tlsfs.ZapFile) (tlsfs.TLSDomainCertificate, error)
Decode attempts to decode the contents of the zap file as a tlsfs.Account, returning an error if the it failed.
type TLSDomainZapEncoder ¶
type TLSDomainZapEncoder struct{}
TLSDomainZapEncoder implements a tls.ZapFile encoder which transforms a giving tls.TLSDomainCertificate into a ZapFile.
func (TLSDomainZapEncoder) Encode ¶
func (enc TLSDomainZapEncoder) Encode(cert tlsfs.TLSDomainCertificate) (tlsfs.ZapFile, error)
Encode implements the procedure to transform a tlsfs.TLSDomainCertificate to transform a tlsfs.TLSDomainCertificate into a tlsfs.ZapFile.
type UserAcct ¶
type UserAcct struct { Email string PrivateKey crypto.PrivateKey Resource *acme.RegistrationResource }
UserAcct implements the tlsfs.Account acct for registering users for a desired domain.
func NewUserAcct ¶
func NewUserAcct(email string, key crypto.PrivateKey, reg *acme.RegistrationResource) *UserAcct
NewUserAcct returns a new UserAcct type which implements both the tlsfs.Account and Registration interface.
func (UserAcct) GetPrivateKey ¶
func (u UserAcct) GetPrivateKey() crypto.PrivateKey
GetPrivateKey returns the private key associated with user.
func (UserAcct) GetRegistration ¶
func (u UserAcct) GetRegistration() *acme.RegistrationResource
GetRegistration returns the acme.RegistrationResource associated with the user account.
type ZapCorruptedError ¶
ZapCorruptedError defines an zap error which contain a given reason for the case of a corrupted zap file.
func WithZapCorrupted ¶
func WithZapCorrupted(err error) *ZapCorruptedError
WithZapCorrupted error returns a new instance of ZapCorruptedError.
func (ZapCorruptedError) Error ¶
func (zc ZapCorruptedError) Error() string
Error implements the error interface.