#5: F2 sub-project 2 - IMAP SEARCH, EXPUNGE, COPY, MOVE
Adds the second F2 sub-project on top of the merged IMAP core: full SEARCH criteria matching (flags, dates, size, headers, body/text, NOT/OR), EXPUNGE (soft-delete via expunged_at), COPY, and MOVE (RFC 6851, advertised via CapMove/CapUIDPlus). Verified end-to-end with a real go-imap/v2 client against embedded Postgres. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
de082a190c
commit
0ec0698079
15 files changed
+1378
-21
No files matched your search
@@ -0,0 +1,21 @@
|
||||
package port
|
||||
|
||||
import "context"
|
||||
|
||||
// CopiedMessage records one message's UID before and after a COPY/MOVE.
|
||||
type CopiedMessage struct {
|
||||
SourceUID uint32
|
||||
DestUID uint32
|
||||
}
|
||||
|
||||
// CopyRepository duplicates messages into another folder, preserving their
|
||||
// blob reference (content-hash dedup - PLAN.md section 9) and flags.
|
||||
type CopyRepository interface {
|
||||
// CopyMessages copies each message identified by (sourceFolderID, uid)
|
||||
// in uids into destFolderID, allocating a new UID in the destination
|
||||
// per message, preserving flags, and incrementing the destination
|
||||
// folder's total_count/unread_count and the destination mailbox's
|
||||
// used_bytes accordingly. Returns one CopiedMessage per input uid, in
|
||||
// the same order as uids.
|
||||
CopyMessages(ctx context.Context, sourceFolderID string, uids []uint32, destFolderID string) ([]CopiedMessage, error)
|
||||
}
|
||||
Reference in new issue
Block a user