Documentation ¶
Index ¶
- Variables
- type IMAPBackend
- type IMAPMailbox
- func (mbox *IMAPMailbox) Check() error
- func (mbox *IMAPMailbox) CopyMessages(uid bool, seqset *imap.SeqSet, destName string) error
- func (mbox *IMAPMailbox) CreateMessage(flags []string, date time.Time, body imap.Literal) error
- func (mbox *IMAPMailbox) Expunge() error
- func (mbox *IMAPMailbox) Info() (*imap.MailboxInfo, error)
- func (mbox *IMAPMailbox) ListMessages(uid bool, seqSet *imap.SeqSet, items []imap.FetchItem, ch chan<- *imap.Message) error
- func (mbox *IMAPMailbox) Name() string
- func (mbox *IMAPMailbox) SearchMessages(uid bool, criteria *imap.SearchCriteria) ([]uint32, error)
- func (mbox *IMAPMailbox) SetSubscribed(subscribed bool) error
- func (mbox *IMAPMailbox) Status(items []imap.StatusItem) (*imap.MailboxStatus, error)
- func (mbox *IMAPMailbox) UpdateMessagesFlags(uid bool, seqset *imap.SeqSet, op imap.FlagsOp, flags []string) error
- type IMAPMessage
- type IMAPUser
- func (u *IMAPUser) CreateMailbox(name string) error
- func (u *IMAPUser) DeleteMailbox(name string) error
- func (u *IMAPUser) GetMailbox(name string) (backend.Mailbox, error)
- func (u *IMAPUser) ListMailboxes(subscribed bool) ([]backend.Mailbox, error)
- func (u *IMAPUser) Logout() error
- func (u *IMAPUser) RenameMailbox(existingName, newName string) error
- func (u *IMAPUser) Username() string
Constants ¶
This section is empty.
Variables ¶
View Source
var Delimiter = "/"
Functions ¶
This section is empty.
Types ¶
type IMAPBackend ¶
type IMAPBackend struct {
// contains filtered or unexported fields
}
func NewIMAPBackend ¶
func NewIMAPBackend(userRepo *models.UserRepository, mailboxRepo *models.MailboxRepository, messageRepo *models.MessageRepository, loginAttempts *loginattempts.LoginAttempts) (*IMAPBackend, error)
func (*IMAPBackend) AddMail ¶
func (b *IMAPBackend) AddMail(smtpState *smtp.State) (*IMAPMessage, error)
AddMail saves a new smtp message in the IMAP backend.
func (*IMAPBackend) MailaddressExists ¶
func (b *IMAPBackend) MailaddressExists(address string) (bool, error)
MailaddressExists checks whether a mailbox exist for the given address.
type IMAPMailbox ¶
type IMAPMailbox struct {
// contains filtered or unexported fields
}
func (*IMAPMailbox) Check ¶
func (mbox *IMAPMailbox) Check() error
func (*IMAPMailbox) CopyMessages ¶
func (mbox *IMAPMailbox) CopyMessages(uid bool, seqset *imap.SeqSet, destName string) error
func (*IMAPMailbox) CreateMessage ¶
func (mbox *IMAPMailbox) CreateMessage(flags []string, date time.Time, body imap.Literal) error
func (*IMAPMailbox) Expunge ¶
func (mbox *IMAPMailbox) Expunge() error
func (*IMAPMailbox) Info ¶
func (mbox *IMAPMailbox) Info() (*imap.MailboxInfo, error)
func (*IMAPMailbox) ListMessages ¶
func (mbox *IMAPMailbox) ListMessages(uid bool, seqSet *imap.SeqSet, items []imap.FetchItem, ch chan<- *imap.Message) error
func (*IMAPMailbox) Name ¶
func (mbox *IMAPMailbox) Name() string
func (*IMAPMailbox) SearchMessages ¶
func (mbox *IMAPMailbox) SearchMessages(uid bool, criteria *imap.SearchCriteria) ([]uint32, error)
func (*IMAPMailbox) SetSubscribed ¶
func (mbox *IMAPMailbox) SetSubscribed(subscribed bool) error
func (*IMAPMailbox) Status ¶
func (mbox *IMAPMailbox) Status(items []imap.StatusItem) (*imap.MailboxStatus, error)
func (*IMAPMailbox) UpdateMessagesFlags ¶
func (mbox *IMAPMailbox) UpdateMessagesFlags(uid bool, seqset *imap.SeqSet, op imap.FlagsOp, flags []string) error
type IMAPMessage ¶
type IMAPMessage struct {
// contains filtered or unexported fields
}
func NewIMAPMessageFromMessage ¶
func NewIMAPMessageFromMessage(message *models.Message, messageRepo *models.MessageRepository) IMAPMessage
func (*IMAPMessage) Fetch ¶
func (m *IMAPMessage) Fetch(seqNum uint32, items []imap.FetchItem) (*imap.Message, error)
type IMAPUser ¶
type IMAPUser struct {
// contains filtered or unexported fields
}
IMAPUser implements the emersion/go-imap User interface. it wraps our own user and repository into a struct.
func (*IMAPUser) CreateMailbox ¶
func (*IMAPUser) DeleteMailbox ¶
func (*IMAPUser) ListMailboxes ¶
func (*IMAPUser) RenameMailbox ¶
Click to show internal directories.
Click to hide internal directories.