Documentation
¶
Overview ¶
Package app holds the orchestration logic for the imapsync-go CLI subcommands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrSilentExit = errors.New("silent exit")
ErrSilentExit signals main to exit with a non-zero code without printing "Error: ...". Use it when ActionSync has already shown a human-friendly summary to stdout and a second copy of the same information through stderr would just clutter the screen.
Functions ¶
func ActionShow ¶
ActionShow displays information about mailboxes in source and destination IMAP accounts.
Types ¶
type FolderSyncPlan ¶
type FolderSyncPlan struct {
SourceFolder string
DestinationFolder string
SrcUIDs []uint32
NewMessages int
NewSize uint64
DestinationFolderExists bool
}
FolderSyncPlan describes how a single source folder should be copied to its destination.
SrcUIDs holds the source UIDs (sorted) for messages present on src but missing on dst; bodies are deliberately not fetched at planning time so a confirm prompt can show counts without materializing potentially many GB of mail in memory.
type SyncSummary ¶
type SyncSummary struct {
Plans []FolderSyncPlan
TotalNew int
TotalNewSize uint64
}
SyncSummary aggregates the per-folder plans along with total message counts and an estimated total byte volume.
TotalNewSize is approximate: it scales the source folder's full RFC822.SIZE total by the new-to-total message ratio (NewMessages / SourceMessages). The exact size would require an extra UID FETCH per new UID, which is not worth the round-trips for what is only a preview number.