Versions in this module Expand all Collapse all v1 v1.4.1 Jul 26, 2026 Changes in this version type API + func (a *API) ApproveMagicLinkHandler() http.Handler + func (a *API) ConfigureProvisioning(enabled bool, secret string) + func (a *API) RejectMagicLinkHandler() http.Handler type OAuthError + RequestID string v1.1.0 Jul 21, 2026 Changes in this version + const LabelSystemPrefix + const MaxAddressLen + const MaxLabelLength + const MaxLabelsPerOp + var ErrEventExpired = errEventExpired + var ErrEventNotFound = errEventNotFound + func AgentSuppressionAddedHook(outbox webhookpub.Outbox) identity.AgentSuppressionTxHook + func InsertReplayDelivery(ctx context.Context, pool *pgxpool.Pool, eventID, webhookID, eventType string, ...) (string, error) + func NewOutboundDeliverer(sender *outbound.Sender) outboundsend.Deliverer + func NewOutboundRampGate(store *sendramp.Store, schedule sendramp.Schedule, enabled bool, ...) outboundsend.RampGate + func NewOutboundSendStore(store *identity.Store, outbox webhookpub.Outbox, ...) outboundsend.Store + func NormalizeAndValidateLabelList(raw []string, op string) ([]string, error) + func StripAgentSelfAliases(addrs []string, agentEmail string) []string + func ValidateDomain(domain string) (string, error) + func ValidateRecipients(groups ...[]string) error + func ValidateWebhookURL(rawURL string) error + type API struct + func NewAPI(store *identity.Store, sender *outbound.Sender, smtpRelay *outbound.SMTPRelay, ...) *API + func (a *API) ApproveInboundReviewCore(ctx context.Context, userID string, msg *identity.ReviewMessageMeta) *OutboundError + func (a *API) ApprovePendingCore(ctx context.Context, userID, messageID, expectedAgentEmail string, ...) (*identity.Message, *OutboundError) + func (a *API) AuthenticatePrincipal(r *http.Request) (*identity.Principal, error) + func (a *API) AuthenticateUser(r *http.Request) (*identity.User, error) + func (a *API) DeleteUserDataCore(ctx context.Context, user *identity.User) (*identity.DeleteUserDataResult, error) + func (a *API) DeliverOutbound(ctx context.Context, user *identity.User, agent *identity.AgentIdentity, ...) (*OutboundResult, *OutboundError) + func (a *API) DownloadLimitAllow(key string) (bool, time.Duration, int, int, int) + func (a *API) ExportUserDataCore(ctx context.Context, userID string) (*identity.UserExport, error) + func (a *API) HoldForApprovalCore(ctx context.Context, agent *identity.AgentIdentity, req outbound.SendRequest, ...) (*identity.Message, error) + func (a *API) PollLimitAllow(key string) (bool, time.Duration, int, int, int) + func (a *API) RegLimitAllow(key string) (bool, time.Duration, int, int, int) + func (a *API) RegisterRoutes(r *mux.Router) + func (a *API) RejectInboundReviewCore(ctx context.Context, userID, reason string, msg *identity.ReviewMessageMeta) *OutboundError + func (a *API) RejectPendingCore(ctx context.Context, userID, messageID, expectedAgentEmail, reason string) (*identity.Message, *OutboundError) + func (a *API) SendLimitAllow(key string) (bool, time.Duration) + func (a *API) SendTestCore(ctx context.Context, agent *identity.AgentIdentity) (*OutboundResult, *OutboundError) + func (a *API) SetAPIURL(u string) + func (a *API) SetApprovalSigner(s *approvaltoken.Signer) + func (a *API) SetBillingHookURL(s string) + func (a *API) SetDomainTeardownHook(h func(ctx context.Context, tx pgx.Tx, domain string) error) + func (a *API) SetEnforcer(e limits.Enforcer) + func (a *API) SetIdempotencyStore(s *idempotency.Store) + func (a *API) SetInternalAPISecret(s string) + func (a *API) SetManagedUnsubscribeIssuer(i ManagedUnsubscribeIssuer) + func (a *API) SetMetrics(m telemetry.Metrics) + func (a *API) SetNotifyEnqueuer(e NotifyEnqueuer) + func (a *API) SetOAuthProvider(p fosite.OAuth2Provider) + func (a *API) SetOAuthStorage(s *oauth.Storage) + func (a *API) SetOIDCAuth(oa *auth.OIDCAuth) + func (a *API) SetOutboundEnqueuer(e OutboundEnqueuer) + func (a *API) SetOutbox(o webhookpub.Outbox) + func (a *API) SetPollRateLimit(perMinute int) + func (a *API) SetPoolForEvents(p *pgxpool.Pool) + func (a *API) SetSigner(s *agentauth.Signer) + func (a *API) SetSubscriberStore(s *webhook.SubscriberStore) + func (a *API) SetUsageStore(s *usage.Store) + func (a *API) SetWebSocketHub(h WebSocketHub) + func (a *API) UnsubscribeLimitAllow(key string) (bool, time.Duration, int, int, int) + func (a *API) WWWAuthenticateChallenge(r *http.Request) string + type AcceptIdemCompleter func(ctx context.Context, tx pgx.Tx, result *OutboundResult) error + type ApproveIdemCompleter func(ctx context.Context, tx pgx.Tx, approved *identity.Message) error + type ApproveOverrides = approveRequest + type DNSRecordCheck struct + DKIM string + MX string + SPF string + TXTFound bool + func CheckDomainRecords(domain, smtpDomain, verificationToken, dkimSelector, dkimPublicKey string, ...) DNSRecordCheck + type DeliveryStatusJSON = deliveryStatusJSON + type EventView = eventView + func GetEventForUser(ctx context.Context, pool *pgxpool.Pool, userID, eventID string) (*EventView, error) + func ListEventsForUser(ctx context.Context, pool *pgxpool.Pool, ...) ([]EventView, error) + type ForwardRequest struct + Attachments []outbound.Attachment + BCC []string + Body string + CC []string + ConversationID string + HTMLBody string + To []string + type LimitsCaps struct + MaxAgents int + MaxDomains int + MaxMessagesMonth int + MaxStorageBytes int64 + type LimitsInfo struct + Limits LimitsCaps + PlanCode string + UpgradeURL string + Usage LimitsUsage + type LimitsUsage struct + Agents int + Domains int + MessagesMonth int + StorageBytes int64 + type ManagedUnsubscribeIssuer interface + Issue func(ctx context.Context, userID, agentID, recipient string) (string, error) + Ready func() error + type NotifyEnqueuer interface + EnqueueNotifyTx func(ctx context.Context, tx pgx.Tx, messageID string) (int64, error) + type OAuthClientPublicMetadata struct + AccountEligible bool + ClientID string + ClientIDIssuedAt int64 + ClientName string + RedirectURIs []string + Scopes []string + type OAuthError struct + Error string + ErrorDescription string + type OAuthMetadata struct + AgentAuth *agentAuthMetadata + AuthorizationEndpoint string + AuthorizationResponseIssParameterSupported bool + CodeChallengeMethodsSupported []string + GrantTypesSupported []string + Issuer string + JWKSURI string + RegistrationEndpoint string + ResponseModesSupported []string + ResponseTypesSupported []string + RevocationEndpoint string + RevocationEndpointAuthMethodsSupported []string + ScopesSupported []string + TokenEndpoint string + TokenEndpointAuthMethodsSupported []string + type OAuthRegisterRequest struct + ClientName string + GrantTypes []string + RedirectURIs []string + ResponseTypes []string + Scope string + TokenEndpointAuthMethod string + type OAuthRegisterResponse struct + ClientID string + ClientIDIssuedAt int64 + ClientName string + GrantTypes []string + RedirectURIs []string + ResponseTypes []string + Scope string + TokenEndpointAuthMethod string + type OutboundEnqueuer interface + EnqueueSendTx func(ctx context.Context, tx pgx.Tx, messageID string) (int64, error) + type OutboundError struct + Code string + Details map[string]any + Msg string + Status int + func (e *OutboundError) Error() string + type OutboundResult struct + ApprovalExpiresAt *time.Time + Held bool + MessageID string + Method string + PendingMessageID string + ProviderMessageID string + SentAs string + Status string + type ReplayEvent struct + Envelope []byte + EventType string + MatchedWebhookIDs []string + MessageID *string + func LoadReplayEvent(ctx context.Context, pool *pgxpool.Pool, userID, eventID string) (*ReplayEvent, error) + type WebSocketHub interface + IsConnected func(agentID string) bool + Send func(agentID string, msg []byte) bool