imap

package
v0.1.6 Latest Latest
Warning

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

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

Documentation

Index

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

func (s *IMAPService) AddMailbox(ctx context.Context, config *models.Mailbox) error

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

Jump to

Keyboard shortcuts

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