Versions in this module Expand all Collapse all v0 v0.3.0 Oct 19, 2026 Changes in this version + const MaxDraftInstruction + const VerdictMove + type Draft struct + Instruction string + ReadPrevious bool type Result + SenderSource string type Rule + Draft *Draft + Notify []int64 type SenderRule + Folder string v0.2.0 Oct 9, 2026 v0.1.4 Oct 8, 2026 v0.1.3 Oct 8, 2026 Changes in this version + const AccountByAddress type Cond + func (c Cond) MapAccounts(fn func(any) any) Cond type Rule + MailboxRemoved bool + func (r Rule) AccountIDs() []int64 + func (r Rule) DropAccount(id int64) (Rule, bool) v0.1.2 Oct 8, 2026 Changes in this version + const AllMailboxes type File + Mailboxes map[string]string type Options + RouteOnly []Rule v0.1.1 Oct 8, 2026 v0.1.0 Oct 8, 2026 Changes in this version + const ActArchive + const ActFlag + const ActJunk + const ActKeep + const ActMove + const ActRead + const ActTrash + const ActUnflag + const ActUnread + const MatchAddress + const MatchDomain + const MinTrashConfidence + const OpContains + const OpContainsAny + const OpEq + const OpExists + const OpGt + const OpIn + const OpLt + const OpMatches + const OpNe + const OpNotContains + const VerdictBlock + const VerdictKeep + const VerdictRoute + func ActionTypes() []string + func FolderProblem(name string) string + func MarshalYAML(f File) ([]byte, error) + type Action struct + Folder string + Type string + func (a Action) String() string + type Cond struct + All []Cond + Any []Cond + Field string + Op string + Value any + func (c *Cond) UnmarshalJSON(b []byte) error + func (c Cond) IsEmpty() bool + func (c Cond) Match(e *message.Summary, now time.Time) bool + func (c Cond) Text() string + type Defaults struct + DecisionModel string + FallbackModel string + MinConfidence *float64 + type Evaluation struct + Candidates []Rule + CutOff *Rule + Final *Result + func Evaluate(e message.Summary, rs []Rule, senders []SenderRule, opt Options) Evaluation + func (ev Evaluation) Resolve(ruleID int64, confidence float64) Result + type Field struct + Name string + Ops []string + Type string + func Fields() []Field + type File struct + Defaults Defaults + Rules []Rule + func ParseYAML(data []byte) (File, error) + type Options struct + MinConfidence float64 + Now time.Time + type Result struct + Actions []Action + Confidence float64 + Review bool + RuleID int64 + RuleVersion int + SenderRuleID int64 + Stacked []int64 + Stage Stage + type Rule struct + AccountID int64 + Actions []Action + Conditions Cond + CreatedAt int64 + Enabled bool + Exceptions Cond + ID int64 + Intent string + MinConfidence *float64 + Model string + Name string + Priority int + Said string + Stack bool + Template string + UpdatedAt int64 + UserID int64 + Version int + func (r Rule) Validate() error + type RuleError struct + Err *ValidationError + ID string + N int + func (e *RuleError) Error() string + func (e *RuleError) Sentence() string + func (e *RuleError) Unwrap() error + type SenderRule struct + CreatedAt int64 + Hits int + ID int64 + MatchType string + RuleID int64 + Source string + UserID int64 + Value string + Verdict string + type Stage string + const StageCondition + const StageDecider + const StageNone + const StageSender + type ValidationError struct + Message string + Path string + func (e *ValidationError) Error() string