Documentation
¶
Index ¶
- func NewMockExporterImpl(salesforceClient email.SalesforceClient) emailpb.ExporterClient
- type MockCA
- type MockCRLGenerator
- type MockExporterClientImpl
- type MockSalesforceClientImpl
- type PublisherClient
- type ServerStreamClient
- type StorageAuthorityReadOnly
- func (sa *StorageAuthorityReadOnly) CheckIdentifiersPaused(_ context.Context, _ *sapb.PauseRequest, _ ...grpc.CallOption) (*sapb.Identifiers, error)
- func (sa *StorageAuthorityReadOnly) CountInvalidAuthorizations2(ctx context.Context, req *sapb.CountInvalidAuthorizationsRequest, ...) (*sapb.Count, error)
- func (sa *StorageAuthorityReadOnly) CountPendingAuthorizations2(ctx context.Context, req *sapb.RegistrationID, _ ...grpc.CallOption) (*sapb.Count, error)
- func (sa *StorageAuthorityReadOnly) FQDNSetExists(_ context.Context, _ *sapb.FQDNSetExistsRequest, _ ...grpc.CallOption) (*sapb.Exists, error)
- func (sa *StorageAuthorityReadOnly) FQDNSetTimestampsForWindow(_ context.Context, _ *sapb.CountFQDNSetsRequest, _ ...grpc.CallOption) (*sapb.Timestamps, error)
- func (sa *StorageAuthorityReadOnly) GetAuthorization2(ctx context.Context, id *sapb.AuthorizationID2, _ ...grpc.CallOption) (*corepb.Authorization, error)
- func (sa *StorageAuthorityReadOnly) GetCertificate(_ context.Context, req *sapb.Serial, _ ...grpc.CallOption) (*corepb.Certificate, error)
- func (sa *StorageAuthorityReadOnly) GetCertificateStatus(_ context.Context, req *sapb.Serial, _ ...grpc.CallOption) (*corepb.CertificateStatus, error)
- func (sa *StorageAuthorityReadOnly) GetEnabledRateLimitOverrides(_ context.Context, _ *emptypb.Empty, _ ...grpc.CallOption) (sapb.StorageAuthorityReadOnly_GetEnabledRateLimitOverridesClient, error)
- func (sa *StorageAuthorityReadOnly) GetLintPrecertificate(_ context.Context, req *sapb.Serial, _ ...grpc.CallOption) (*corepb.Certificate, error)
- func (sa *StorageAuthorityReadOnly) GetOrder(_ context.Context, req *sapb.OrderRequest, _ ...grpc.CallOption) (*corepb.Order, error)
- func (sa *StorageAuthorityReadOnly) GetOrderForNames(_ context.Context, _ *sapb.GetOrderForNamesRequest, _ ...grpc.CallOption) (*corepb.Order, error)
- func (sa *StorageAuthorityReadOnly) GetPausedIdentifiers(_ context.Context, _ *sapb.RegistrationID, _ ...grpc.CallOption) (*sapb.Identifiers, error)
- func (sa *StorageAuthorityReadOnly) GetRateLimitOverride(_ context.Context, req *sapb.GetRateLimitOverrideRequest, _ ...grpc.CallOption) (*sapb.RateLimitOverrideResponse, error)
- func (sa *StorageAuthorityReadOnly) GetRegistration(_ context.Context, req *sapb.RegistrationID, _ ...grpc.CallOption) (*corepb.Registration, error)
- func (sa *StorageAuthorityReadOnly) GetRegistrationByKey(_ context.Context, req *sapb.JSONWebKey, _ ...grpc.CallOption) (*corepb.Registration, error)
- func (sa *StorageAuthorityReadOnly) GetRevocationStatus(_ context.Context, req *sapb.Serial, _ ...grpc.CallOption) (*sapb.RevocationStatus, error)
- func (sa *StorageAuthorityReadOnly) GetRevokedCertsByShard(ctx context.Context, _ *sapb.GetRevokedCertsByShardRequest, ...) (grpc.ServerStreamingClient[corepb.CRLEntry], error)
- func (sa *StorageAuthorityReadOnly) GetSerialMetadata(ctx context.Context, req *sapb.Serial, _ ...grpc.CallOption) (*sapb.SerialMetadata, error)
- func (sa *StorageAuthorityReadOnly) GetSerialsByAccount(ctx context.Context, _ *sapb.RegistrationID, _ ...grpc.CallOption) (sapb.StorageAuthorityReadOnly_GetSerialsByAccountClient, error)
- func (sa *StorageAuthorityReadOnly) GetSerialsByKey(ctx context.Context, _ *sapb.SPKIHash, _ ...grpc.CallOption) (sapb.StorageAuthorityReadOnly_GetSerialsByKeyClient, error)
- func (sa *StorageAuthorityReadOnly) GetValidAuthorizations2(ctx context.Context, req *sapb.GetValidAuthorizationsRequest, ...) (*sapb.Authorizations, error)
- func (sa *StorageAuthorityReadOnly) GetValidOrderAuthorizations2(ctx context.Context, req *sapb.GetValidOrderAuthorizationsRequest, ...) (*sapb.Authorizations, error)
- func (sa *StorageAuthorityReadOnly) IncidentsForSerial(ctx context.Context, req *sapb.Serial, _ ...grpc.CallOption) (*sapb.Incidents, error)
- func (sa *StorageAuthorityReadOnly) KeyBlocked(ctx context.Context, req *sapb.SPKIHash, _ ...grpc.CallOption) (*sapb.Exists, error)
- func (sa *StorageAuthorityReadOnly) ReplacementOrderExists(ctx context.Context, req *sapb.Serial, _ ...grpc.CallOption) (*sapb.Exists, error)
- func (sa *StorageAuthorityReadOnly) SerialsForIncident(ctx context.Context, _ *sapb.SerialsForIncidentRequest, _ ...grpc.CallOption) (sapb.StorageAuthorityReadOnly_SerialsForIncidentClient, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMockExporterImpl ¶
func NewMockExporterImpl(salesforceClient email.SalesforceClient) emailpb.ExporterClient
NewMockExporterImpl returns a MockExporterClientImpl as an ExporterClient.
Types ¶
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) IssueCertificate ¶
func (ca *MockCA) IssueCertificate(ctx context.Context, req *capb.IssueCertificateRequest, _ ...grpc.CallOption) (*capb.IssueCertificateResponse, error)
IssueCertificate is a mock
type MockCRLGenerator ¶
type MockCRLGenerator struct{}
func (*MockCRLGenerator) GenerateCRL ¶
func (ca *MockCRLGenerator) GenerateCRL(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[capb.GenerateCRLRequest, capb.GenerateCRLResponse], error)
GenerateCRL is a mock
type MockExporterClientImpl ¶
type MockExporterClientImpl struct {
SalesforceClient email.SalesforceClient
}
MockExporterClientImpl is a mock implementation of ExporterClient.
func (*MockExporterClientImpl) SendCase ¶ added in v0.20251103.0
func (m *MockExporterClientImpl) SendCase(ctx context.Context, req *emailpb.SendCaseRequest, _ ...grpc.CallOption) (*emptypb.Empty, error)
SendCase submits a Case using the inner email.SalesforceClient.
func (*MockExporterClientImpl) SendContacts ¶
func (m *MockExporterClientImpl) SendContacts(ctx context.Context, req *emailpb.SendContactsRequest, _ ...grpc.CallOption) (*emptypb.Empty, error)
SendContacts submits emails to the inner email.SalesforceClient, returning an error if any fail.
type MockSalesforceClientImpl ¶ added in v0.20251103.0
type MockSalesforceClientImpl struct {
sync.Mutex
CreatedContacts []string
CreatedCases []email.Case
}
MockSalesforceClientImpl is a mock implementation of email.SalesforceClient.
func NewMockSalesforceClientImpl ¶ added in v0.20251103.0
func NewMockSalesforceClientImpl() *MockSalesforceClientImpl
NewMockSalesforceClientImpl returns a MockSalesforceClientImpl, which implements the PardotClient interface. It returns the underlying concrete type, so callers have access to its struct members and helper methods.
func (*MockSalesforceClientImpl) GetCreatedCases ¶ added in v0.20251103.0
func (m *MockSalesforceClientImpl) GetCreatedCases() []email.Case
GetCreatedCases is used for testing to retrieve the list of created cases in a thread-safe manner.
func (*MockSalesforceClientImpl) GetCreatedContacts ¶ added in v0.20251103.0
func (m *MockSalesforceClientImpl) GetCreatedContacts() []string
GetCreatedContacts is used for testing to retrieve the list of created contacts in a thread-safe manner.
func (*MockSalesforceClientImpl) SendCase ¶ added in v0.20251103.0
func (m *MockSalesforceClientImpl) SendCase(payload email.Case) error
SendCase adds a case payload to CreatedCases.
func (*MockSalesforceClientImpl) SendContact ¶ added in v0.20251103.0
func (m *MockSalesforceClientImpl) SendContact(email string) error
SendContact adds an email to CreatedContacts.
type PublisherClient ¶
type PublisherClient struct {
}
PublisherClient is a mock
func (*PublisherClient) SubmitToSingleCTWithResult ¶
func (*PublisherClient) SubmitToSingleCTWithResult(_ context.Context, _ *pubpb.Request, _ ...grpc.CallOption) (*pubpb.Result, error)
SubmitToSingleCTWithResult is a mock
type ServerStreamClient ¶
type ServerStreamClient[T any] struct { grpc.ClientStream Results []*T Err error }
ServerStreamClient is a mock which satisfies the grpc.ClientStream interface, allowing it to be returned by methods where the server returns a stream of results. It can be populated with a list of results to return, or an error to return.
func (*ServerStreamClient[T]) Recv ¶
func (c *ServerStreamClient[T]) Recv() (*T, error)
Recv returns the error, if populated. Otherwise it returns the next item from the list of results. If it has returned all items already, it returns EOF.
type StorageAuthorityReadOnly ¶
type StorageAuthorityReadOnly struct {
// contains filtered or unexported fields
}
StorageAuthorityReadOnly is a mock of sapb.StorageAuthorityReadOnlyClient
func NewStorageAuthorityReadOnly ¶
func NewStorageAuthorityReadOnly(clk clock.Clock) *StorageAuthorityReadOnly
NewStorageAuthorityReadOnly creates a new mock read-only storage authority with the given clock.
func (*StorageAuthorityReadOnly) CheckIdentifiersPaused ¶
func (sa *StorageAuthorityReadOnly) CheckIdentifiersPaused(_ context.Context, _ *sapb.PauseRequest, _ ...grpc.CallOption) (*sapb.Identifiers, error)
CheckIdentifiersPaused is a mock
func (*StorageAuthorityReadOnly) CountInvalidAuthorizations2 ¶
func (sa *StorageAuthorityReadOnly) CountInvalidAuthorizations2(ctx context.Context, req *sapb.CountInvalidAuthorizationsRequest, _ ...grpc.CallOption) (*sapb.Count, error)
func (*StorageAuthorityReadOnly) CountPendingAuthorizations2 ¶
func (sa *StorageAuthorityReadOnly) CountPendingAuthorizations2(ctx context.Context, req *sapb.RegistrationID, _ ...grpc.CallOption) (*sapb.Count, error)
func (*StorageAuthorityReadOnly) FQDNSetExists ¶
func (sa *StorageAuthorityReadOnly) FQDNSetExists(_ context.Context, _ *sapb.FQDNSetExistsRequest, _ ...grpc.CallOption) (*sapb.Exists, error)
FQDNSetExists is a mock
func (*StorageAuthorityReadOnly) FQDNSetTimestampsForWindow ¶
func (sa *StorageAuthorityReadOnly) FQDNSetTimestampsForWindow(_ context.Context, _ *sapb.CountFQDNSetsRequest, _ ...grpc.CallOption) (*sapb.Timestamps, error)
FQDNSetTimestampsForWindow is a mock
func (*StorageAuthorityReadOnly) GetAuthorization2 ¶
func (sa *StorageAuthorityReadOnly) GetAuthorization2(ctx context.Context, id *sapb.AuthorizationID2, _ ...grpc.CallOption) (*corepb.Authorization, error)
GetAuthorization2 is a mock
func (*StorageAuthorityReadOnly) GetCertificate ¶
func (sa *StorageAuthorityReadOnly) GetCertificate(_ context.Context, req *sapb.Serial, _ ...grpc.CallOption) (*corepb.Certificate, error)
GetCertificate is a mock
func (*StorageAuthorityReadOnly) GetCertificateStatus ¶
func (sa *StorageAuthorityReadOnly) GetCertificateStatus(_ context.Context, req *sapb.Serial, _ ...grpc.CallOption) (*corepb.CertificateStatus, error)
GetCertificateStatus is a mock
func (*StorageAuthorityReadOnly) GetEnabledRateLimitOverrides ¶
func (sa *StorageAuthorityReadOnly) GetEnabledRateLimitOverrides(_ context.Context, _ *emptypb.Empty, _ ...grpc.CallOption) (sapb.StorageAuthorityReadOnly_GetEnabledRateLimitOverridesClient, error)
GetEnabledRateLimitOverrides is a mock
func (*StorageAuthorityReadOnly) GetLintPrecertificate ¶
func (sa *StorageAuthorityReadOnly) GetLintPrecertificate(_ context.Context, req *sapb.Serial, _ ...grpc.CallOption) (*corepb.Certificate, error)
GetLintPrecertificate is a mock
func (*StorageAuthorityReadOnly) GetOrder ¶
func (sa *StorageAuthorityReadOnly) GetOrder(_ context.Context, req *sapb.OrderRequest, _ ...grpc.CallOption) (*corepb.Order, error)
GetOrder is a mock
func (*StorageAuthorityReadOnly) GetOrderForNames ¶
func (sa *StorageAuthorityReadOnly) GetOrderForNames(_ context.Context, _ *sapb.GetOrderForNamesRequest, _ ...grpc.CallOption) (*corepb.Order, error)
func (*StorageAuthorityReadOnly) GetPausedIdentifiers ¶
func (sa *StorageAuthorityReadOnly) GetPausedIdentifiers(_ context.Context, _ *sapb.RegistrationID, _ ...grpc.CallOption) (*sapb.Identifiers, error)
GetPausedIdentifiers is a mock
func (*StorageAuthorityReadOnly) GetRateLimitOverride ¶
func (sa *StorageAuthorityReadOnly) GetRateLimitOverride(_ context.Context, req *sapb.GetRateLimitOverrideRequest, _ ...grpc.CallOption) (*sapb.RateLimitOverrideResponse, error)
GetRateLimitOverride is a mock
func (*StorageAuthorityReadOnly) GetRegistration ¶
func (sa *StorageAuthorityReadOnly) GetRegistration(_ context.Context, req *sapb.RegistrationID, _ ...grpc.CallOption) (*corepb.Registration, error)
GetRegistration is a mock
func (*StorageAuthorityReadOnly) GetRegistrationByKey ¶
func (sa *StorageAuthorityReadOnly) GetRegistrationByKey(_ context.Context, req *sapb.JSONWebKey, _ ...grpc.CallOption) (*corepb.Registration, error)
GetRegistrationByKey is a mock
func (*StorageAuthorityReadOnly) GetRevocationStatus ¶
func (sa *StorageAuthorityReadOnly) GetRevocationStatus(_ context.Context, req *sapb.Serial, _ ...grpc.CallOption) (*sapb.RevocationStatus, error)
GetRevocationStatus is a mock
func (*StorageAuthorityReadOnly) GetRevokedCertsByShard ¶
func (sa *StorageAuthorityReadOnly) GetRevokedCertsByShard(ctx context.Context, _ *sapb.GetRevokedCertsByShardRequest, _ ...grpc.CallOption) (grpc.ServerStreamingClient[corepb.CRLEntry], error)
GetRevokedCertsByShard is a mock
func (*StorageAuthorityReadOnly) GetSerialMetadata ¶
func (sa *StorageAuthorityReadOnly) GetSerialMetadata(ctx context.Context, req *sapb.Serial, _ ...grpc.CallOption) (*sapb.SerialMetadata, error)
GetSerialMetadata is a mock
func (*StorageAuthorityReadOnly) GetSerialsByAccount ¶
func (sa *StorageAuthorityReadOnly) GetSerialsByAccount(ctx context.Context, _ *sapb.RegistrationID, _ ...grpc.CallOption) (sapb.StorageAuthorityReadOnly_GetSerialsByAccountClient, error)
GetSerialsByAccount is a mock
func (*StorageAuthorityReadOnly) GetSerialsByKey ¶
func (sa *StorageAuthorityReadOnly) GetSerialsByKey(ctx context.Context, _ *sapb.SPKIHash, _ ...grpc.CallOption) (sapb.StorageAuthorityReadOnly_GetSerialsByKeyClient, error)
GetSerialsByKey is a mock
func (*StorageAuthorityReadOnly) GetValidAuthorizations2 ¶
func (sa *StorageAuthorityReadOnly) GetValidAuthorizations2(ctx context.Context, req *sapb.GetValidAuthorizationsRequest, _ ...grpc.CallOption) (*sapb.Authorizations, error)
func (*StorageAuthorityReadOnly) GetValidOrderAuthorizations2 ¶
func (sa *StorageAuthorityReadOnly) GetValidOrderAuthorizations2(ctx context.Context, req *sapb.GetValidOrderAuthorizationsRequest, _ ...grpc.CallOption) (*sapb.Authorizations, error)
func (*StorageAuthorityReadOnly) IncidentsForSerial ¶
func (sa *StorageAuthorityReadOnly) IncidentsForSerial(ctx context.Context, req *sapb.Serial, _ ...grpc.CallOption) (*sapb.Incidents, error)
IncidentsForSerial is a mock.
func (*StorageAuthorityReadOnly) KeyBlocked ¶
func (sa *StorageAuthorityReadOnly) KeyBlocked(ctx context.Context, req *sapb.SPKIHash, _ ...grpc.CallOption) (*sapb.Exists, error)
KeyBlocked is a mock
func (*StorageAuthorityReadOnly) ReplacementOrderExists ¶
func (sa *StorageAuthorityReadOnly) ReplacementOrderExists(ctx context.Context, req *sapb.Serial, _ ...grpc.CallOption) (*sapb.Exists, error)
ReplacementOrderExists is a mock.
func (*StorageAuthorityReadOnly) SerialsForIncident ¶
func (sa *StorageAuthorityReadOnly) SerialsForIncident(ctx context.Context, _ *sapb.SerialsForIncidentRequest, _ ...grpc.CallOption) (sapb.StorageAuthorityReadOnly_SerialsForIncidentClient, error)
SerialsForIncident is a mock