Versions in this module Expand all Collapse all v1 v1.4.1 Jul 26, 2026 v1.1.0 Jul 21, 2026 Changes in this version + const TestHMACSecret + func NewEventsAPIHarness(t *testing.T, pool *pgxpool.Pool, store *identity.Store, ...) *httptest.Server + func OpenPreparedTestDB(ctx context.Context, dbURL string) (*pgxpool.Pool, error) + func TestDB(t *testing.T) *pgxpool.Pool + func TestDBURL() string + func TruncateAll(t *testing.T, pool *pgxpool.Pool) + type ContractServer struct + APIKey string + BaseURL string + DBPool *pgxpool.Pool + SMTPAddr string + Store *identity.Store + UserID string + WSHub *ws.Hub + func StartContractServer(ctx context.Context, dbURL string) (*ContractServer, error) + func (s *ContractServer) Close(ctx context.Context) error + type E2ATestServer struct + HTTPServer *httptest.Server + SMTPAddr string + Store *identity.Store + SubscriberStore *webhook.SubscriberStore + WSHub *ws.Hub + func TestServer(t *testing.T, pool *pgxpool.Pool, opts ...TestServerOption) *E2ATestServer + func (ts *E2ATestServer) DrainAndDeliver(ctx context.Context) + func (ts *E2ATestServer) StartJobs(t *testing.T, ctx context.Context) + type ReceivedPayload struct + Body webhook.Payload + Headers http.Header + RawBody []byte + type SMTPAddr struct + Host string + Port int + func FakeSMTPServer(t *testing.T) (SMTPAddr, func() []SMTPMessage) + type SMTPMessage struct + Data string + From string + Recipients []string + To string + type SubscriberCaptured struct + Envelope map[string]any + Headers http.Header + RawBody []byte + URL string + type SubscriberReceiverResult struct + Server *httptest.Server + func SubscriberReceiver(t *testing.T) *SubscriberReceiverResult + func (s *SubscriberReceiverResult) Captured() []SubscriberCaptured + func (s *SubscriberReceiverResult) Reset() + func (s *SubscriberReceiverResult) SetStatus(path string, code int) + func (s *SubscriberReceiverResult) WaitFor(t *testing.T, timeout time.Duration, predicate func([]SubscriberCaptured) bool) []SubscriberCaptured + type TestServerOption func(*testServerOpts) + func WithInboundAuthentication(authentication *emailauth.Authentication) TestServerOption + func WithManualJobs() TestServerOption + func WithOutboundSMTP(host string, port int, fromDomain string) TestServerOption + func WithOutboundSMTPMessageIDDomain(domain string) TestServerOption + type WebhookReceiverResult struct + Server *httptest.Server + func WebhookReceiver(t *testing.T) *WebhookReceiverResult + func (w *WebhookReceiverResult) Payloads() []ReceivedPayload + func (w *WebhookReceiverResult) WaitForPayloads(t *testing.T, count int, timeout time.Duration) []ReceivedPayload