imap

package
v0.2.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SYNC_EMAILS_BATCH_SIZE_PER_ITERATION = 20
	SYNC_EMAILS_ITERATIONS_PER_ACQUIRE   = 500
)

Variables

This section is empty.

Functions

Types

type IMAPService

type IMAPService struct {
	// contains filtered or unexported fields
}

func (*IMAPService) AcceptMailboxForSync added in v0.2.16

func (s *IMAPService) AcceptMailboxForSync(ctx context.Context, mailbox *models.Mailbox) bool

func (*IMAPService) GetMessageByUID added in v0.1.12

func (s *IMAPService) GetMessageByUID(ctx context.Context, mailboxID, folderName string, uid uint32) (*imap.Message, error)

func (*IMAPService) ListFolders added in v0.2.16

func (s *IMAPService) ListFolders(ctx context.Context, mailboxID string) ([]string, error)

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

type XOAuth2Auth struct {
	Username string
	Token    string
}

XOAuth2Auth implements XOAUTH2 authentication for Gmail

func (*XOAuth2Auth) Next added in v0.2.16

func (a *XOAuth2Auth) Next(challenge []byte) ([]byte, error)

func (*XOAuth2Auth) Start added in v0.2.16

func (a *XOAuth2Auth) Start() (string, []byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL