Versions in this module Expand all Collapse all v1 v1.8.12 Nov 16, 2021 v1.8.11 Nov 15, 2021 Changes in this version + func LeastUsedColor(mailboxes []Mailbox) string + type EMLProvider struct + func NewEMLProvider(root string) *EMLProvider + func (p *EMLProvider) CreateMailbox(mailbox Mailbox) (Mailbox, error) + func (p *EMLProvider) DefaultMailboxes(sourceMailbox Mailbox) []Mailbox + func (p *EMLProvider) ID() string + func (p *EMLProvider) Mailboxes(includeEmpty, includeAllMail bool) (mailboxes []Mailbox, err error) + func (p *EMLProvider) TransferFrom(rules transferRules, progress *Progress, ch <-chan Message) + func (p *EMLProvider) TransferTo(rules transferRules, progress *Progress, ch chan<- Message) + type ErrIMAPAuth struct + func (e ErrIMAPAuth) Cause() error + func (e ErrIMAPAuth) Error() string + func (e ErrIMAPAuth) Is(target error) bool + func (e ErrIMAPAuth) Unwrap() error + type ErrIMAPAuthMethod struct + func (e ErrIMAPAuthMethod) Cause() error + func (e ErrIMAPAuthMethod) Error() string + func (e ErrIMAPAuthMethod) Is(target error) bool + func (e ErrIMAPAuthMethod) Unwrap() error + type ErrIMAPConnection struct + func (e ErrIMAPConnection) Cause() error + func (e ErrIMAPConnection) Error() string + func (e ErrIMAPConnection) Is(target error) bool + func (e ErrIMAPConnection) Unwrap() error + type IMAPClientProvider interface + Authenticate func(auth sasl.Client) error + Capability func() (map[string]bool, error) + Fetch func(seqset *imap.SeqSet, items []imap.FetchItem, ch chan *imap.Message) error + List func(ref, name string, ch chan *imap.MailboxInfo) error + Login func(username, password string) error + Select func(name string, readOnly bool) (*imap.MailboxStatus, error) + State func() imap.ConnState + Support func(capability string) (bool, error) + SupportAuth func(mech string) (bool, error) + UidFetch func(seqset *imap.SeqSet, items []imap.FetchItem, ch chan *imap.Message) error + type IMAPProvider struct + func NewIMAPProvider(username, password, host, port string) (*IMAPProvider, error) + func (p *IMAPProvider) ID() string + func (p *IMAPProvider) Mailboxes(includeEmpty, includeAllMail bool) ([]Mailbox, error) + func (p *IMAPProvider) TransferTo(rules transferRules, progress *Progress, ch chan<- Message) + type LocalProvider struct + func NewLocalProvider(root string) *LocalProvider + func (p *LocalProvider) ID() string + func (p *LocalProvider) Mailboxes(includeEmpty, includeAllMail bool) ([]Mailbox, error) + func (p *LocalProvider) TransferTo(rules transferRules, progress *Progress, ch chan<- Message) + type MBOXProvider struct + func NewMBOXProvider(root string) *MBOXProvider + func (p *MBOXProvider) CreateMailbox(mailbox Mailbox) (Mailbox, error) + func (p *MBOXProvider) DefaultMailboxes(sourceMailbox Mailbox) []Mailbox + func (p *MBOXProvider) ID() string + func (p *MBOXProvider) Mailboxes(includeEmpty, includeAllMail bool) ([]Mailbox, error) + func (p *MBOXProvider) TransferFrom(rules transferRules, progress *Progress, ch <-chan Message) + func (p *MBOXProvider) TransferTo(rules transferRules, progress *Progress, ch chan<- Message) + type Mailbox struct + Color string + ID string + IsExclusive bool + Name string + func (m Mailbox) Hash() string + func (m Mailbox) IsSystemFolder() bool + type Message struct + Body []byte + ID string + Sources []Mailbox + Targets []Mailbox + Unread bool + type MessageStatus struct + From string + SourceID string + Subject string + Time time.Time + func (status *MessageStatus) GetErrorMessage() string + func (status *MessageStatus) String() string + type MetricsManager interface + Cancel func() + Complete func() + Fail func() + Load func(int) + Start func() + type PMAPIProvider struct + func NewPMAPIProvider(client pmapi.Client, userID, addressID string) (*PMAPIProvider, error) + func (p *PMAPIProvider) CreateMailbox(mailbox Mailbox) (Mailbox, error) + func (p *PMAPIProvider) DefaultMailboxes(_ Mailbox) []Mailbox + func (p *PMAPIProvider) ID() string + func (p *PMAPIProvider) Mailboxes(includeEmpty, includeAllMail bool) ([]Mailbox, error) + func (p *PMAPIProvider) SetConnectionDown() + func (p *PMAPIProvider) SetConnectionUp() + func (p *PMAPIProvider) TransferFrom(rules transferRules, progress *Progress, ch <-chan Message) + func (p *PMAPIProvider) TransferTo(rules transferRules, progress *Progress, ch chan<- Message) + type PanicHandler interface + HandlePanic func() + type Progress struct + func (p *Progress) FileReport() string + func (p *Progress) GenerateBugReport() []byte + func (p *Progress) GetCounts() ProgressCounts + func (p *Progress) GetFailedMessages() []*MessageStatus + func (p *Progress) GetFatalError() error + func (p *Progress) GetUpdateChannel() chan struct{} + func (p *Progress) IsPaused() bool + func (p *Progress) IsStopped() bool + func (p *Progress) Pause(reason string) + func (p *Progress) PauseReason() string + func (p *Progress) Resume() + func (p *Progress) Stop() + type ProgressCounts struct + Added uint + Exported uint + Failed uint + Imported uint + Skipped uint + Total uint + func (c *ProgressCounts) Progress() float32 + type Provider interface + ID func() string + Mailboxes func(includeEmpty, includeAllMail bool) ([]Mailbox, error) + type Rule struct + Active bool + FromTime int64 + SourceMailbox Mailbox + TargetMailboxes []Mailbox + ToTime int64 + func (r *Rule) FromDate() time.Time + func (r *Rule) HasTimeLimit() bool + func (r *Rule) String() string + func (r *Rule) TargetMailboxNames() (names []string) + func (r *Rule) ToDate() time.Time + type SourceProvider interface + TransferTo func(transferRules, *Progress, chan<- Message) + type TargetProvider interface + CreateMailbox func(Mailbox) (Mailbox, error) + DefaultMailboxes func(sourceMailbox Mailbox) (targetMailboxes []Mailbox) + TransferFrom func(transferRules, *Progress, <-chan Message) + type Transfer struct + func New(panicHandler PanicHandler, metrics MetricsManager, logDir, rulesDir string, ...) (*Transfer, error) + func (t *Transfer) ChangeTarget(target TargetProvider) + func (t *Transfer) CreateTargetMailbox(mailbox Mailbox) (Mailbox, error) + func (t *Transfer) GetRule(sourceMailbox Mailbox) *Rule + func (t *Transfer) GetRules() []*Rule + func (t *Transfer) ResetRules() + func (t *Transfer) SetGlobalMailbox(mailbox *Mailbox) + func (t *Transfer) SetGlobalTimeLimit(fromTime, toTime int64) + func (t *Transfer) SetRule(sourceMailbox Mailbox, targetMailboxes []Mailbox, fromTime, toTime int64) error + func (t *Transfer) SetSkipEncryptedMessages(skip bool) + func (t *Transfer) SourceMailboxes() (m []Mailbox, err error) + func (t *Transfer) Start() *Progress + func (t *Transfer) TargetMailboxes() (m []Mailbox, err error) + func (t *Transfer) UnsetRule(sourceMailbox Mailbox)