#6: implement IMAP IDLE (RFC 2177) and CONDSTORE (RFC 7162)

This commit is contained in:
Lucas Rayan committed 2026-07-24 11:43:37 -03:00
1 parent 0ec0698079
commit 6b1e4dc00a
20 files changed
+539 -95

No files matched your search

@@ -16,6 +16,8 @@ const (
type FlagRepository interface {
// SetFlags applies op with flags to the message identified by
// (folderID, uid). Add/Del insert/delete individual message_flags rows;
// Set replaces the message's full flag set in one transaction.
SetFlags(ctx context.Context, folderID string, uid uint32, op FlagOp, flags []string) error
// Set replaces the message's full flag set in one transaction. If
// unchangedSince > 0 and the message's current modseq exceeds it, the update
// is skipped and updated returns false.
SetFlags(ctx context.Context, folderID string, uid uint32, op FlagOp, flags []string, unchangedSince uint64) (updated bool, err error)
}
@@ -9,6 +9,7 @@ type ImapFolderRecord struct {
UIDNext uint32
UIDValidity uint32
NumMessages uint32
HighestModSeq uint64
}
// ImapFolderRepository resolves a mailbox's folders for LIST and SELECT.
@@ -14,6 +14,7 @@ type MessageRecord struct {
SizeBytes int64
ReceivedAt time.Time
Flags []string
ModSeq uint64
}
// MessageQueryRepository lists a folder's messages for FETCH.