Documentation
¶
Index ¶
- Constants
- func NewIMAPService(nats *nats_internal.NATSConnections, repos *repository.Repositories, ...) interfaces.IMAPService
- type IMAPService
- func (s *IMAPService) AcceptMailboxForSync(ctx context.Context, mailbox *models.Mailbox) bool
- func (s *IMAPService) GetMessageByUID(ctx context.Context, mailboxID, folderName string, uid uint32) (*imap.Message, error)
- func (s *IMAPService) ListFolders(ctx context.Context, mailboxID string) ([]string, error)
- func (s *IMAPService) Start(ctx context.Context) error
- func (s *IMAPService) Status() map[string]interfaces.MailboxStatus
- func (s *IMAPService) Stop() error
- type XOAuth2Auth
Constants ¶
View Source
const ( SYNC_EMAILS_BATCH_SIZE_PER_ITERATION = 20 SYNC_EMAILS_ITERATIONS_PER_ACQUIRE = 500 )
Variables ¶
This section is empty.
Functions ¶
func NewIMAPService ¶
func NewIMAPService(nats *nats_internal.NATSConnections, repos *repository.Repositories, googleSvc interfaces.GoogleService) interfaces.IMAPService
Types ¶
type IMAPService ¶
type IMAPService struct {
// contains filtered or unexported fields
}
func (*IMAPService) AcceptMailboxForSync ¶ added in v0.2.16
func (*IMAPService) GetMessageByUID ¶ added in v0.1.12
func (*IMAPService) ListFolders ¶ added in v0.2.16
ListFolders returns a list of all available folders in the mailbox
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
type XOAuth2Auth ¶ added in v0.2.16
XOAuth2Auth implements XOAUTH2 authentication for Gmail
Click to show internal directories.
Click to hide internal directories.