Documentation
¶
Index ¶
- Constants
- func NewIMAPService(events *events.EventsService, repos *repository.Repositories) interfaces.IMAPService
- type IMAPService
- func (s *IMAPService) AddMailbox(ctx context.Context, config *models.Mailbox) error
- func (s *IMAPService) GetMessageByUID(ctx context.Context, mailboxID, folderName string, uid uint32) (*imap.Message, error)
- func (s *IMAPService) RemoveMailbox(ctx context.Context, mailboxID string) error
- 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(events *events.EventsService, 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) GetMessageByUID ¶ added in v0.1.12
func (*IMAPService) RemoveMailbox ¶
func (s *IMAPService) RemoveMailbox(ctx context.Context, mailboxID string) error
RemoveMailbox removes a mailbox configuration
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.