Documentation ¶
Overview ¶
Implements the IMAP MOVE Extension, defined in RFC 6851.
Index ¶
- Constants
- func NewExtension() server.Extension
- type Client
- func (c *Client) Move(seqset *imap.SeqSet, dest string) error
- func (c *Client) MoveWithFallback(seqset *imap.SeqSet, dest string) error
- func (c *Client) SupportMove() (bool, error)
- func (c *Client) UidMove(seqset *imap.SeqSet, dest string) error
- func (c *Client) UidMoveWithFallback(seqset *imap.SeqSet, dest string) error
- type Command
- type Mailbox
- type MoveClient
Constants ¶
const Capability = "MOVE"
The MOVE capability.
Variables ¶
This section is empty.
Functions ¶
func NewExtension ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a MOVE client.
func (*Client) Move ¶
Move moves the specified message(s) to the end of the specified destination mailbox.
func (*Client) MoveWithFallback ¶
MoveWithFallback tries to move if the server supports it. If it doesn't, it falls back to copy, store and expunge, as defined in RFC 6851 section 3.3.
func (*Client) SupportMove ¶
SupportMove checks if the server supports the MOVE extension.
func (*Client) UidMove ¶
UidMove is identical to Move, but seqset is interpreted as containing unique identifiers instead of message sequence numbers.
func (*Client) UidMoveWithFallback ¶
UidMoveWithFallback is identical to MoveWithFallback, but seqset is interpreted as containing unique identifiers instead of message sequence numbers.
type Command ¶
type Command struct { SeqSet *imap.SeqSet Mailbox string }
A MOVE command. See RFC 6851 section 3.1.
type Mailbox ¶
type Mailbox interface { // Move the specified message(s) to the end of the specified destination // mailbox. This means that a new message is created in the target mailbox // with a new UID, the original message is removed from the source mailbox, // and it appears to the client as a single action. // // If the destination mailbox does not exist, a server SHOULD return an error. // It SHOULD NOT automatically create the mailbox. MoveMessages(uid bool, seqset *imap.SeqSet, dest string) error }
A mailbox supporting the MOVE extension.
type MoveClient ¶
type MoveClient = Client
MoveClient is an alias used to compose multiple client extensions.