Documentation ¶
Index ¶
- Variables
- type Manager
- type OpMailboxCreate
- type OpMailboxDelete
- type OpMailboxUpdate
- type OpMessageAdd
- type OpMessageCreate
- type OpMessageFlagged
- type OpMessageRemove
- type OpMessageSeen
- type User
- func (user *User) AddMessagesToMailbox(ctx context.Context, messageIDs []string, mboxID string) error
- func (user *User) Close() error
- func (user *User) CreateMailbox(ctx context.Context, name []string) (imap.Mailbox, error)
- func (user *User) CreateMessage(ctx context.Context, mboxID string, literal []byte, flags imap.FlagSet, ...) (imap.Message, error)
- func (user *User) DeleteMailbox(ctx context.Context, mboxID string, name []string) error
- func (user *User) GetUpdates() <-chan imap.Update
- func (user *User) RemoveMessagesFromMailbox(ctx context.Context, messageIDs []string, mboxID string) error
- func (user *User) SetMessagesFlagged(ctx context.Context, messageIDs []string, flagged bool) error
- func (user *User) SetMessagesSeen(ctx context.Context, messageIDs []string, seen bool) error
- func (user *User) UpdateMailbox(ctx context.Context, mboxID string, oldName, newName []string) error
Constants ¶
This section is empty.
Variables ¶
var ErrNoSuchUser = errors.New("no such user")
var ErrQueueClosed = errors.New("the queue is closed")
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager provides access to remote users.
func New ¶
New returns a new manager which stores serialized operation queues for users in the given base directory.
type OpMailboxCreate ¶
type OpMailboxDelete ¶
type OpMailboxDelete struct {
MBoxID string
}
type OpMailboxUpdate ¶
type OpMessageAdd ¶
type OpMessageCreate ¶
type OpMessageFlagged ¶
type OpMessageRemove ¶
type OpMessageSeen ¶
type User ¶
type User struct {
// contains filtered or unexported fields
}
User performs operations against a remote server using a connector.
func (*User) AddMessagesToMailbox ¶
func (user *User) AddMessagesToMailbox(ctx context.Context, messageIDs []string, mboxID string) error
AddMessageToMailbox adds the message with the given ID to the mailbox with the given ID.
func (*User) CreateMailbox ¶
CreateMailbox creates a new mailbox with the given name.
func (*User) CreateMessage ¶
func (user *User) CreateMessage(ctx context.Context, mboxID string, literal []byte, flags imap.FlagSet, date time.Time) (imap.Message, error)
CreateMessage appends a message literal to the mailbox with the given ID.
func (*User) DeleteMailbox ¶
DeleteMailbox deletes the mailbox with the given ID and name.
func (*User) GetUpdates ¶
GetUpdates returns a channel on which updates from the server are sent.
func (*User) RemoveMessagesFromMailbox ¶
func (user *User) RemoveMessagesFromMailbox(ctx context.Context, messageIDs []string, mboxID string) error
RemoveMessageFromMailbox removes the message with the given ID from the mailbox with the given ID.
func (*User) SetMessagesFlagged ¶
SetMessageFlagged marks the message with the given ID as seen or unseen.
func (*User) SetMessagesSeen ¶
SetMessageSeen marks the message with the given ID as seen or unseen.
Source Files ¶
- manager.go
- operation.go
- operation_mailbox_create.go
- operation_mailbox_delete.go
- operation_mailbox_update.go
- operation_message_add.go
- operation_message_create.go
- operation_message_flagged.go
- operation_message_remove.go
- operation_message_seen.go
- user.go
- user_execute.go
- user_mailbox.go
- user_message.go
- user_queue.go
Directories ¶
Path | Synopsis |
---|---|
Package mock_remote is a generated GoMock package.
|
Package mock_remote is a generated GoMock package. |