Documentation
¶
Index ¶
- Constants
- func NewIMAPService(repos *repository.Repositories) interfaces.IMAPService
- type IMAPService
- func (s *IMAPService) AddMailbox(ctx context.Context, config *models.Mailbox) error
- func (s *IMAPService) RemoveMailbox(ctx context.Context, mailboxID string) error
- func (s *IMAPService) SetEventHandler(handler func(context.Context, interfaces.MailEvent))
- func (s *IMAPService) Start(ctx context.Context) error
- func (s *IMAPService) Status() map[string]interfaces.MailboxStatus
- func (s *IMAPService) Stop() error
Constants ¶
View Source
const ( DEFAULT_IMAP_LOGOUT = 25 // minutes DEFAULT_POLLING_PERIOD = 20 // minutes INITIAL_SYNC_BATCH_SIZE = 20 INITIAL_SYNC_MAX_TOTAL = 50000 )
Variables ¶
This section is empty.
Functions ¶
func NewIMAPService ¶
func NewIMAPService(repos *repository.Repositories) interfaces.IMAPService
Types ¶
type IMAPService ¶
type IMAPService struct {
// contains filtered or unexported fields
}
func (*IMAPService) AddMailbox ¶
AddMailbox adds a new mailbox configuration
func (*IMAPService) RemoveMailbox ¶
func (s *IMAPService) RemoveMailbox(ctx context.Context, mailboxID string) error
RemoveMailbox removes a mailbox configuration
func (*IMAPService) SetEventHandler ¶
func (s *IMAPService) SetEventHandler(handler func(context.Context, interfaces.MailEvent))
SetEventHandler sets the event handler
func (*IMAPService) Start ¶
func (s *IMAPService) Start(ctx context.Context) error
Start initializes the service and connects to mailboxes
func (*IMAPService) Status ¶
func (s *IMAPService) Status() map[string]interfaces.MailboxStatus
Status returns the current status of all mailboxes
func (*IMAPService) Stop ¶
func (s *IMAPService) Stop() error
Stop gracefully shuts down the service
Click to show internal directories.
Click to hide internal directories.