Documentation
¶
Overview ¶
Package service coordinates mailbox workflows across repositories, providers, and blob storage.
Index ¶
- func BytesReader(value []byte) io.Reader
- func SafeFilename(filename string) string
- type Mailbox
- func (s *Mailbox) ApplyConfig(cfg config.Config)
- func (s *Mailbox) Ingest(ctx context.Context, webhookEventID, resendEmailID string, bestEffort bool) error
- func (s *Mailbox) JobHandlers() map[string]jobs.Handler
- func (s *Mailbox) Send(ctx context.Context, messageID string) error
- func (s *Mailbox) SendDigest(ctx context.Context, subscriptionID string, since, until time.Time) error
- func (s *Mailbox) SendDigestPreview(ctx context.Context, sub model.DigestSubscription, since, until time.Time) error
- type SafeError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesReader ¶
BytesReader is retained for provider fakes and streaming tests.
func SafeFilename ¶
SafeFilename creates a display-only fallback and never participates in a storage path.
Types ¶
type Mailbox ¶
type Mailbox struct {
// contains filtered or unexported fields
}
Mailbox owns recoverable application workflows.
func NewMailbox ¶
func NewMailbox(cfg config.Config, repo *repository.Repository, store blobstore.Store, client provider.Client) *Mailbox
NewMailbox creates a mailbox service.
func (*Mailbox) ApplyConfig ¶ added in v0.3.1
ApplyConfig updates settings that are safe to reload while the process runs.
func (*Mailbox) Ingest ¶
func (s *Mailbox) Ingest(ctx context.Context, webhookEventID, resendEmailID string, bestEffort bool) error
Ingest retrieves, archives, sanitizes, indexes, and threads one received email.
func (*Mailbox) JobHandlers ¶
JobHandlers returns every supported durable work kind.
func (*Mailbox) Send ¶
Send submits one queued message with stable application and provider idempotency.
func (*Mailbox) SendDigest ¶ added in v0.3.1
func (s *Mailbox) SendDigest(ctx context.Context, subscriptionID string, since, until time.Time) error
SendDigest sends a metadata-only summary to the recipient configured by the user. It deliberately excludes subjects, senders, and message bodies.
func (*Mailbox) SendDigestPreview ¶ added in v0.4.1
func (s *Mailbox) SendDigestPreview(ctx context.Context, sub model.DigestSubscription, since, until time.Time) error
SendDigestPreview sends the same metadata-only report immediately without changing the subscription schedule or last successful delivery timestamp.
type SafeError ¶
SafeError separates administrator-safe context from detailed structured logs.