mongodb

package
v0.0.0-...-865c5c3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(
	ldap *ldap.Connection,
	userRepo *repository.UserRepository,
	mailboxRepo *repository.MailboxRepository,
	messageRepo *repository.MessageRepository,
) *mongoBackend

Types

type ImapMailbox

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

func NewMailbox

func NewMailbox(
	userRepo *repository.UserRepository,
	mailboxRepo *repository.MailboxRepository,
	messageRepo *repository.MessageRepository,
	id string,
	name string,
	owner string,
	username string,
	readonly bool,
	conn backend.Conn,
) (*ImapMailbox, error)

func (*ImapMailbox) Close

func (i *ImapMailbox) Close() error

func (*ImapMailbox) CopyMessages

func (i *ImapMailbox) CopyMessages(uid bool, seqset *imap.SeqSet, dest string) error

func (*ImapMailbox) Expunge

func (i *ImapMailbox) Expunge() error

func (*ImapMailbox) Info

func (i *ImapMailbox) Info() (*imap.MailboxInfo, error)

func (*ImapMailbox) ListMessages

func (i *ImapMailbox) ListMessages(uid bool, seqset *imap.SeqSet, items []imap.FetchItem, ch chan<- *imap.Message) error

func (*ImapMailbox) Name

func (i *ImapMailbox) Name() string

func (*ImapMailbox) Poll

func (i *ImapMailbox) Poll(expunge bool) error

func (*ImapMailbox) SearchMessages

func (i *ImapMailbox) SearchMessages(uid bool, criteria *imap.SearchCriteria) ([]uint32, error)

func (*ImapMailbox) Status

func (i *ImapMailbox) Status(items []imap.StatusItem) (*imap.MailboxStatus, error)

func (*ImapMailbox) UpdateMessagesFlags

func (i *ImapMailbox) UpdateMessagesFlags(uid bool, seqset *imap.SeqSet, operation imap.FlagsOp, silent bool, flags []string) error

type ImapUser

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

func NewUser

func NewUser(
	userRepo *repository.UserRepository,
	mailboxRepo *repository.MailboxRepository,
	messageRepo *repository.MessageRepository,
	userInfo *ldap.UserInfo,
) *ImapUser

func (*ImapUser) CreateMailbox

func (i *ImapUser) CreateMailbox(name string) error

func (*ImapUser) CreateMessage

func (i *ImapUser) CreateMessage(mbox string, flags []string, date time.Time, body imap.Literal, selectedMailbox backend.Mailbox) error

func (*ImapUser) DeleteMailbox

func (i *ImapUser) DeleteMailbox(name string) error

func (*ImapUser) GetMailbox

func (i *ImapUser) GetMailbox(name string, readOnly bool, conn backend.Conn) (*imap.MailboxStatus, backend.Mailbox, error)

func (*ImapUser) ListMailboxes

func (i *ImapUser) ListMailboxes(subscribed bool) ([]imap.MailboxInfo, error)

func (*ImapUser) Logout

func (i *ImapUser) Logout() error

func (*ImapUser) Namespaces

func (i *ImapUser) Namespaces() (personal, other, shared []namespace.Namespace, err error)

func (*ImapUser) RenameMailbox

func (i *ImapUser) RenameMailbox(existingName, newName string) error

func (*ImapUser) SetSubscribed

func (i *ImapUser) SetSubscribed(mbox string, subscribed bool) error

func (*ImapUser) Status

func (i *ImapUser) Status(mbox string, items []imap.StatusItem) (*imap.MailboxStatus, error)

func (*ImapUser) Username

func (i *ImapUser) Username() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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