Documentation ¶
Index ¶
- type Mailer
- type MailerMessage
- type MockCA
- func (ca *MockCA) GenerateOCSP(ctx context.Context, xferObj core.OCSPSigningRequest) (ocsp []byte, err error)
- func (ca *MockCA) IssueCertificate(ctx context.Context, _ *caPB.IssueCertificateRequest) (core.Certificate, error)
- func (ca *MockCA) IssueCertificateForPrecertificate(ctx context.Context, _ *caPB.IssueCertificateForPrecertificateRequest) (core.Certificate, error)
- func (ca *MockCA) IssuePrecertificate(ctx context.Context, _ *caPB.IssueCertificateRequest) (*caPB.IssuePrecertificateResponse, error)
- func (ca *MockCA) RevokeCertificate(ctx context.Context, serial string, reasonCode revocation.Reason) (err error)
- type Publisher
- type SAWithFailedChallenges
- type StorageAuthority
- func (sa *StorageAuthority) AddCertificate(_ context.Context, certDER []byte, regID int64, _ []byte) (digest string, err error)
- func (sa *StorageAuthority) AddPendingAuthorizations(ctx context.Context, req *sapb.AddPendingAuthorizationsRequest) (*sapb.AuthorizationIDs, error)
- func (sa *StorageAuthority) AddSCTReceipt(_ context.Context, sct core.SignedCertificateTimestamp) (err error)
- func (sa *StorageAuthority) CountCertificatesByExactNames(_ context.Context, _ []string, _, _ time.Time) (ret []*sapb.CountByNames_MapElement, err error)
- func (sa *StorageAuthority) CountCertificatesByNames(_ context.Context, _ []string, _, _ time.Time) (ret []*sapb.CountByNames_MapElement, err error)
- func (sa *StorageAuthority) CountCertificatesRange(_ context.Context, _, _ time.Time) (int64, error)
- func (sa *StorageAuthority) CountFQDNSets(_ context.Context, since time.Duration, names []string) (int64, error)
- func (sa *StorageAuthority) CountInvalidAuthorizations(ctx context.Context, req *sapb.CountInvalidAuthorizationsRequest) (count *sapb.Count, err error)
- func (sa *StorageAuthority) CountPendingAuthorizations(_ context.Context, _ int64) (int, error)
- func (sa *StorageAuthority) CountRegistrationsByIP(_ context.Context, _ net.IP, _, _ time.Time) (int, error)
- func (sa *StorageAuthority) CountRegistrationsByIPRange(_ context.Context, _ net.IP, _, _ time.Time) (int, error)
- func (sa *StorageAuthority) DeactivateAuthorization(_ context.Context, _ string) error
- func (sa *StorageAuthority) DeactivateRegistration(_ context.Context, _ int64) error
- func (sa *StorageAuthority) FQDNSetExists(_ context.Context, names []string) (bool, error)
- func (sa *StorageAuthority) FinalizeAuthorization(_ context.Context, authz core.Authorization) (err error)
- func (sa *StorageAuthority) FinalizeOrder(_ context.Context, order *corepb.Order) error
- func (sa *StorageAuthority) GetAuthorization(_ context.Context, id string) (core.Authorization, error)
- func (sa *StorageAuthority) GetAuthorizations(ctx context.Context, req *sapb.GetAuthorizationsRequest) (*sapb.Authorizations, error)
- func (sa *StorageAuthority) GetCertificate(_ context.Context, serial string) (core.Certificate, error)
- func (sa *StorageAuthority) GetCertificateStatus(_ context.Context, serial string) (core.CertificateStatus, error)
- func (sa *StorageAuthority) GetOrder(_ context.Context, req *sapb.OrderRequest) (*corepb.Order, error)
- func (sa *StorageAuthority) GetOrderAuthorizations(_ context.Context, req *sapb.GetOrderAuthorizationsRequest) (map[string]*core.Authorization, error)
- func (sa *StorageAuthority) GetPendingAuthorization(ctx context.Context, req *sapb.GetPendingAuthorizationRequest) (*core.Authorization, error)
- func (sa *StorageAuthority) GetRegistration(_ context.Context, id int64) (core.Registration, error)
- func (sa *StorageAuthority) GetRegistrationByKey(_ context.Context, jwk *jose.JSONWebKey) (core.Registration, error)
- func (sa *StorageAuthority) GetSCTReceipt(_ context.Context, serial string, logID string) (sct core.SignedCertificateTimestamp, err error)
- func (sa *StorageAuthority) GetValidAuthorizations(_ context.Context, regID int64, names []string, now time.Time) (map[string]*core.Authorization, error)
- func (sa *StorageAuthority) MarkCertificateRevoked(_ context.Context, serial string, reasonCode revocation.Reason) (err error)
- func (sa *StorageAuthority) NewOrder(_ context.Context, order *corepb.Order) (*corepb.Order, error)
- func (sa *StorageAuthority) NewPendingAuthorization(_ context.Context, authz core.Authorization) (output core.Authorization, err error)
- func (sa *StorageAuthority) NewRegistration(_ context.Context, reg core.Registration) (regR core.Registration, err error)
- func (sa *StorageAuthority) RevokeAuthorizationsByDomain(_ context.Context, ident core.AcmeIdentifier) (int64, int64, error)
- func (sa *StorageAuthority) SetOrderProcessing(_ context.Context, order *corepb.Order) error
- func (sa *StorageAuthority) UpdatePendingAuthorization(_ context.Context, authz core.Authorization) (err error)
- func (sa *StorageAuthority) UpdateRegistration(_ context.Context, reg core.Registration) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MailerMessage ¶
MailerMessage holds the captured emails from SendMail()
type MockCA ¶
type MockCA struct {
PEM []byte
}
MockCA is a mock of a CA that always returns the cert from PEM in response to IssueCertificate.
func (*MockCA) GenerateOCSP ¶
func (ca *MockCA) GenerateOCSP(ctx context.Context, xferObj core.OCSPSigningRequest) (ocsp []byte, err error)
GenerateOCSP is a mock
func (*MockCA) IssueCertificate ¶
func (ca *MockCA) IssueCertificate(ctx context.Context, _ *caPB.IssueCertificateRequest) (core.Certificate, error)
IssueCertificate is a mock
func (*MockCA) IssueCertificateForPrecertificate ¶
func (ca *MockCA) IssueCertificateForPrecertificate(ctx context.Context, _ *caPB.IssueCertificateForPrecertificateRequest) (core.Certificate, error)
IssueCertificateForPrecertificate is a mock
func (*MockCA) IssuePrecertificate ¶
func (ca *MockCA) IssuePrecertificate(ctx context.Context, _ *caPB.IssueCertificateRequest) (*caPB.IssuePrecertificateResponse, error)
IssuePrecertificate is a mock
func (*MockCA) RevokeCertificate ¶
func (ca *MockCA) RevokeCertificate(ctx context.Context, serial string, reasonCode revocation.Reason) (err error)
RevokeCertificate is a mock
type Publisher ¶
type Publisher struct { }
Publisher is a mock
func (*Publisher) SubmitToCT ¶
SubmitToCT is a mock
type SAWithFailedChallenges ¶
type SAWithFailedChallenges struct { StorageAuthority Clk clock.FakeClock }
mockSAWithFailedChallenges is a mocks.StorageAuthority that has a `GetAuthorization` implementation that can return authorizations with failed challenges.
func (*SAWithFailedChallenges) GetAuthorization ¶
func (sa *SAWithFailedChallenges) GetAuthorization(_ context.Context, id string) (core.Authorization, error)
type StorageAuthority ¶
type StorageAuthority struct {
// contains filtered or unexported fields
}
StorageAuthority is a mock
func NewStorageAuthority ¶
func NewStorageAuthority(clk clock.Clock) *StorageAuthority
NewStorageAuthority creates a new mock storage authority with the given clock.
func (*StorageAuthority) AddCertificate ¶
func (sa *StorageAuthority) AddCertificate(_ context.Context, certDER []byte, regID int64, _ []byte) (digest string, err error)
AddCertificate is a mock
func (*StorageAuthority) AddPendingAuthorizations ¶
func (sa *StorageAuthority) AddPendingAuthorizations(ctx context.Context, req *sapb.AddPendingAuthorizationsRequest) (*sapb.AuthorizationIDs, error)
AddPendingAuthorizations is a mock
func (*StorageAuthority) AddSCTReceipt ¶
func (sa *StorageAuthority) AddSCTReceipt(_ context.Context, sct core.SignedCertificateTimestamp) (err error)
AddSCTReceipt is a mock
func (*StorageAuthority) CountCertificatesByExactNames ¶
func (sa *StorageAuthority) CountCertificatesByExactNames(_ context.Context, _ []string, _, _ time.Time) (ret []*sapb.CountByNames_MapElement, err error)
CountCertificatesByExactNames is a mock
func (*StorageAuthority) CountCertificatesByNames ¶
func (sa *StorageAuthority) CountCertificatesByNames(_ context.Context, _ []string, _, _ time.Time) (ret []*sapb.CountByNames_MapElement, err error)
CountCertificatesByNames is a mock
func (*StorageAuthority) CountCertificatesRange ¶
func (sa *StorageAuthority) CountCertificatesRange(_ context.Context, _, _ time.Time) (int64, error)
CountCertificatesRange is a mock
func (*StorageAuthority) CountFQDNSets ¶
func (sa *StorageAuthority) CountFQDNSets(_ context.Context, since time.Duration, names []string) (int64, error)
CountFQDNSets is a mock
func (*StorageAuthority) CountInvalidAuthorizations ¶
func (sa *StorageAuthority) CountInvalidAuthorizations(ctx context.Context, req *sapb.CountInvalidAuthorizationsRequest) (count *sapb.Count, err error)
CountInvalidAuthorizations is a mock
func (*StorageAuthority) CountPendingAuthorizations ¶
CountPendingAuthorizations is a mock
func (*StorageAuthority) CountRegistrationsByIP ¶
func (sa *StorageAuthority) CountRegistrationsByIP(_ context.Context, _ net.IP, _, _ time.Time) (int, error)
CountRegistrationsByIP is a mock
func (*StorageAuthority) CountRegistrationsByIPRange ¶
func (sa *StorageAuthority) CountRegistrationsByIPRange(_ context.Context, _ net.IP, _, _ time.Time) (int, error)
CountRegistrationsByIPRange is a mock
func (*StorageAuthority) DeactivateAuthorization ¶
func (sa *StorageAuthority) DeactivateAuthorization(_ context.Context, _ string) error
DeactivateAuthorization is a mock
func (*StorageAuthority) DeactivateRegistration ¶
func (sa *StorageAuthority) DeactivateRegistration(_ context.Context, _ int64) error
DeactivateRegistration is a mock
func (*StorageAuthority) FQDNSetExists ¶
FQDNSetExists is a mock
func (*StorageAuthority) FinalizeAuthorization ¶
func (sa *StorageAuthority) FinalizeAuthorization(_ context.Context, authz core.Authorization) (err error)
FinalizeAuthorization is a mock
func (*StorageAuthority) FinalizeOrder ¶
FinalizeOrder is a mock
func (*StorageAuthority) GetAuthorization ¶
func (sa *StorageAuthority) GetAuthorization(_ context.Context, id string) (core.Authorization, error)
GetAuthorization is a mock
func (*StorageAuthority) GetAuthorizations ¶
func (sa *StorageAuthority) GetAuthorizations(ctx context.Context, req *sapb.GetAuthorizationsRequest) (*sapb.Authorizations, error)
GetAuthorizations is a mock
func (*StorageAuthority) GetCertificate ¶
func (sa *StorageAuthority) GetCertificate(_ context.Context, serial string) (core.Certificate, error)
GetCertificate is a mock
func (*StorageAuthority) GetCertificateStatus ¶
func (sa *StorageAuthority) GetCertificateStatus(_ context.Context, serial string) (core.CertificateStatus, error)
GetCertificateStatus is a mock
func (*StorageAuthority) GetOrder ¶
func (sa *StorageAuthority) GetOrder(_ context.Context, req *sapb.OrderRequest) (*corepb.Order, error)
GetOrder is a mock
func (*StorageAuthority) GetOrderAuthorizations ¶
func (sa *StorageAuthority) GetOrderAuthorizations(_ context.Context, req *sapb.GetOrderAuthorizationsRequest) (map[string]*core.Authorization, error)
func (*StorageAuthority) GetPendingAuthorization ¶
func (sa *StorageAuthority) GetPendingAuthorization(ctx context.Context, req *sapb.GetPendingAuthorizationRequest) (*core.Authorization, error)
func (*StorageAuthority) GetRegistration ¶
func (sa *StorageAuthority) GetRegistration(_ context.Context, id int64) (core.Registration, error)
GetRegistration is a mock
func (*StorageAuthority) GetRegistrationByKey ¶
func (sa *StorageAuthority) GetRegistrationByKey(_ context.Context, jwk *jose.JSONWebKey) (core.Registration, error)
GetRegistrationByKey is a mock
func (*StorageAuthority) GetSCTReceipt ¶
func (sa *StorageAuthority) GetSCTReceipt(_ context.Context, serial string, logID string) (sct core.SignedCertificateTimestamp, err error)
GetSCTReceipt is a mock
func (*StorageAuthority) GetValidAuthorizations ¶
func (sa *StorageAuthority) GetValidAuthorizations(_ context.Context, regID int64, names []string, now time.Time) (map[string]*core.Authorization, error)
GetValidAuthorizations is a mock
func (*StorageAuthority) MarkCertificateRevoked ¶
func (sa *StorageAuthority) MarkCertificateRevoked(_ context.Context, serial string, reasonCode revocation.Reason) (err error)
MarkCertificateRevoked is a mock
func (*StorageAuthority) NewPendingAuthorization ¶
func (sa *StorageAuthority) NewPendingAuthorization(_ context.Context, authz core.Authorization) (output core.Authorization, err error)
NewPendingAuthorization is a mock
func (*StorageAuthority) NewRegistration ¶
func (sa *StorageAuthority) NewRegistration(_ context.Context, reg core.Registration) (regR core.Registration, err error)
NewRegistration is a mock
func (*StorageAuthority) RevokeAuthorizationsByDomain ¶
func (sa *StorageAuthority) RevokeAuthorizationsByDomain(_ context.Context, ident core.AcmeIdentifier) (int64, int64, error)
RevokeAuthorizationsByDomain is a mock
func (*StorageAuthority) SetOrderProcessing ¶
SetOrderProcessing is a mock
func (*StorageAuthority) UpdatePendingAuthorization ¶
func (sa *StorageAuthority) UpdatePendingAuthorization(_ context.Context, authz core.Authorization) (err error)
UpdatePendingAuthorization is a mock
func (*StorageAuthority) UpdateRegistration ¶
func (sa *StorageAuthority) UpdateRegistration(_ context.Context, reg core.Registration) (err error)
UpdateRegistration is a mock