Versions in this module Expand all Collapse all v0 v0.3.0 Oct 19, 2026 Changes in this version + const ConnectionActive + const ConnectionDomainPending + const ConnectionNone + const DestinationSlack + const DestinationWebhook + const DraftWait + const EndedRemovalDays + const EndedSecretsDays + const ErrorQueue + const ForgetDays + const IntervalMonth + const IntervalYear + const InvitationDays + const MailboxConnectFailed + const MailboxExists + const MailboxLimitReached + const MailboxMismatch + const MailboxPlanEnded + const MailboxRefused + const MailboxStepCode + const MailboxStepMailboxPassword + const MailboxStepSignIn + const MailboxUnavailable + const MailboxWorkspaceOnly + const MoveDays + const MoveSweepEvery + const MoveWatchDays + const NoLimit + const NoticeDays + const PlanEnded + const PlanPersonal + const PlanPro + const PlanTeam + const PlanTrial + const PortalDomain + const PortalSSO + const RemovedMailboxDays + const RoleAdmin + const RoleMember + const RoleOwner + const SignInRemoved + const SignInSeatsFull + const StatusActive + const StatusCancelsAtPeriodEnd + const StatusPastDue + const TrialDays + var ErrAnswered = store.ErrAnswered + var ErrBadPlan = store.ErrBadPlan + var ErrKeyUnavailable = crypto.ErrKeyUnavailable + var ErrMailboxExists = errors.New("this mailbox is already connected") + var ErrMailboxLimit = store.ErrMailboxLimit + var ErrMailboxMismatch = errors.New("signed in as another address than the mailbox's") + var ErrNoInvitation = errors.New("no such invitation") + var ErrNoMailbox = errors.New("no such mailbox connected by the module") + var ErrNoMove = errors.New("no such move is kept") + var ErrNoNotice = errors.New("no such notice is kept") + var ErrNoTenant = errors.New("no such tenant") + var ErrPlanEnded error = planEnded + var ErrReconnect = mail.ErrReconnect + var ErrRemovedMember = store.ErrRemovedMember + var ErrSeatLimit = store.ErrSeatLimit + var ErrWrongKey = crypto.ErrDecrypt + type Billing struct + ChangePlan func(ctx context.Context, c PlanChange) error + Checkout func(ctx context.Context, c CheckoutRequest) (json.RawMessage, error) + CompanySignIn func(ctx context.Context, c CompanySignInChange) error + Note string + Plans map[string]PlanTerms + Portal func(ctx context.Context, tenantID int64, record string) (url string, err error) + Script string + Sources CheckoutSources + type CheckoutRequest struct + Email string + Interval string + Plan string + Seats int + TenantID int64 + type CheckoutSources struct + Connect []string + Frames []string + Images []string + InlineStyles bool + Scripts []string + Styles []string + type CompanySignInChange struct + Add bool + Interval string + Record string + TenantID int64 + type CompanySignInTerms struct + IncludedSeats int + Prices map[string]string + type Deliveries interface + Record func(ctx context.Context, d Delivery) error + type Delivery struct + At time.Time + NoticeID int64 + Reason string + Sent bool + type Destination struct + ID int64 + Kind string + Name string + Secret string + URL string + type DraftEmail struct + Date time.Time + From string + FromName string + Subject string + Text string + To []string + type DraftRefused struct + Reason string + func (e *DraftRefused) Error() string + type DraftRequest struct + Email DraftEmail + ID int64 + Instruction string + Mailbox string + Model Generator + Previous *DraftEmail + RuleID int64 + RuleName string + TenantID int64 + type Drafts struct + Write func(ctx context.Context, r DraftRequest) (string, error) + type ErrorEvent struct + Attrs map[string]any + Dropped int + Message string + Stack string + Time time.Time + Version string + type GoogleSignIn struct + AdminHelpURL string + ClientID string type Host + AcceptInvitation func(ctx context.Context, tenantID int64, email string) error + AddMailbox func(ctx context.Context, m NewMailbox) (accountID int64, err error) + ForgetIdentity func(ctx context.Context, provider, subject string) error + MailboxAdded func(w http.ResponseWriter, r *http.Request, accountID int64) + MailboxFailed func(w http.ResponseWriter, r *http.Request, code string) + MailboxReconnected func(w http.ResponseWriter, r *http.Request, accountID int64) + Plan func(ctx context.Context, tenantID int64) (PlanState, error) + ReconnectMailbox func(ctx context.Context, accountID int64, address, secret string) error + SetPlan func(ctx context.Context, tenantID int64, p Plan) error + Who func(r *http.Request) Who + type Invitation struct + Email string + ExpiresAt time.Time + ID int64 + InvitedBy string + Organisation string + Record string + Role string + TenantID int64 + type KeyProvider interface + KeyID func() string + Unwrap func(ctx context.Context, tenantID int64, keyID string, wrapped []byte) ([]byte, error) + Wrap func(ctx context.Context, tenantID int64, key []byte) ([]byte, error) + type Limits struct + AIEmails int + FirstCleanupEmails int + Mailboxes int + Seats int + type MailToken struct + AccessToken string + Secret string + type MailboxForm struct + Path string + Provider string + type MailboxFormInput struct + AccountID int64 + Code string + Password string + State string + Step string + Username string + type MailboxFormStep struct + AccountID int64 + Message string + State string + Step string + type MailboxSignIn struct + Connect string + Google *GoogleSignIn + Login func(ctx context.Context, provider, secret string) (MailToken, error) + Providers []string type Module + Billing *Billing + DeleteIdentity func(ctx context.Context, provider, subject string) error + Drafts *Drafts + Errors func(ctx context.Context, e ErrorEvent) + Keys KeyProvider + MailboxForms []MailboxForm + MailboxRemoved func(ctx context.Context, m RemovedMailbox) error + Mailboxes *MailboxSignIn + Moves *Moves + Notifications *Notifications + Team *Team + type Move struct + AccountID int64 + At time.Time + Chosen string + Count int + Filed string + FiledAt time.Time + From string + ID int64 + Inbox bool + Mailbox string + RuleID int64 + RuleName string + TenantID int64 + type Moves struct + Every time.Duration + Moved func(ctx context.Context, m Move, q Questions) error + Serves func(ctx context.Context, tenantID int64) bool + type NewMailbox struct + Address string + CertFingerprint string + Host string + Password bool + Port int + Provider string + Secret string + TLSMode string + type Notice struct + Actions []string + ActivityID int64 + At time.Time + Destination Destination + Folder string + From string + FromName string + ID int64 + Link string + Mailbox string + RuleID int64 + RuleName string + Subject string + TenantID int64 + type Notifications struct + Kinds []string + Notify func(ctx context.Context, n Notice, d Deliveries) error + Start func(ctx context.Context, d Deliveries) + type Plan struct + CompanySignInAddOn bool + Interval string + PeriodEnd time.Time + Plan string + Record string + Seats int + Status string + type PlanChange struct + CompanySignIn bool + Interval string + Plan string + Record string + Seats int + TenantID int64 + type PlanState struct + CompanySignIn bool + EndedAt time.Time + TrialEnd time.Time + type PlanTerms struct + CompanySignIn *CompanySignInTerms + Features []string + Includes []string + Limits Limits + MinSeats int + Name string + PerSeat bool + Prices map[string]string + type PortalRequest struct + Intent string + Organisation string + TenantID int64 + type Questions interface + Ask func(ctx context.Context, moveID int64) error + type RemovedMailbox struct + AccountID int64 + Address string + ID int64 + Provider string + Secret string type Route + Role string + type Team struct + AdminPortal func(ctx context.Context, p PortalRequest) (url string, err error) + Connection func(ctx context.Context, tenantID int64, organisation string) (state string, err error) + Invite func(ctx context.Context, inv Invitation) (record string, err error) + RemoveMember func(ctx context.Context, tenantID int64, id Identity) error + Revoke func(ctx context.Context, inv Invitation) error + type Who struct + Email string + Role string + TenantID int64 + UserID int64 v0.2.0 Oct 9, 2026 Changes in this version + const SignInChooseTenant + const SignInEmailInUse + const SignInRefused + const SignInTenantMismatch + const SignInUnavailable + var ErrEmailInUse = store.ErrEmailInUse + var ErrTenantMismatch = store.ErrTenantMismatch type Host + EndSessions func(ctx context.Context, provider, subject string) error + SignIn func(w http.ResponseWriter, r *http.Request, id Identity) (userID int64, err error) + SignInFailed func(w http.ResponseWriter, r *http.Request, code string) + type Identity struct + Email string + Provider string + Subject string + Tenant string type Module + SignIn string + SignOut string type Route + Public bool + Webhook bool v0.1.4 Oct 8, 2026 v0.1.3 Oct 8, 2026 v0.1.2 Oct 8, 2026 v0.1.1 Oct 8, 2026 v0.1.0 Oct 8, 2026 Changes in this version + const ActArchive + const ActMove + const ActTrash + const CardSamples + const StageCondition + const StageNone + var ErrBadOutput = models.ErrBadOutput + var ErrModel = composer.ErrModel + func ActionsSchema() map[string]any + func CondSchema() map[string]any + func Matches(rule Rule, email *Summary, now time.Time) bool + func RuleGrammar() string + func RuleLine(r Rule) string + func WithPurpose(ctx context.Context, purpose string) context.Context + type Action = rules.Action + type Cond = rules.Cond + type Draft = composer.Draft + func ReadDraft(raw json.RawMessage, named string, existing []Rule, folders []string) Draft + type EventStream interface + Fail func(err error, code, message string) + Send func(event string, v any) + Started func() bool + type FetchOptions = composer.FetchOptions + type Generator interface + Generate func(ctx context.Context, system, user string, schema json.RawMessage, out any) (Usage, error) + func ComposerFromEnv(getenv func(string) string) (Generator, string, error) + type Host interface + Composer func(ctx context.Context) (Generator, error) + EventStream func(w http.ResponseWriter) EventStream + Fail func(w http.ResponseWriter, r *http.Request, err error) + Folders func(ctx context.Context, accountID int64) ([]string, error) + Invalid func(w http.ResponseWriter, path, message string) + Mail func(accountID int64) (Mail, error) + ReadJSON func(w http.ResponseWriter, r *http.Request, v any) bool + RecordUsage func(ctx context.Context, purpose string, u Usage) + Rules func(ctx context.Context, userID int64) ([]Rule, error) + Scope func(w http.ResponseWriter, r *http.Request, in ScopeInput) (Scope, bool) + UsageChanged func() + UserID func(r *http.Request) int64 + WantsStream func(r *http.Request) bool + WriteJSON func(w http.ResponseWriter, status int, v any) + type Mail interface + Fetch func(ctx context.Context, refs []MsgRef, opts FetchOptions, ...) error + List func(ctx context.Context, folder string, since time.Time, limit int) (refs []MsgRef, matched int, err error) + type Module struct + Name string + Routes func(h Host) []Route + type MsgRef = mail.MsgRef + type Problem = composer.Problem + type Route struct + Handler http.HandlerFunc + Method string + Path string + type Row = composer.Row + type Rule = rules.Rule + type Scope struct + AccountID int64 + Folder string + Limit int + Since time.Time + type ScopeInput struct + AccountID int64 + Folder string + Limit *int + Since *int64 + type Summary = message.Summary + func ParseEmail(raw []byte, accountID int64, bodyChars int) (*Summary, error) + type Usage = models.Usage