go-imap-move: github.com/emersion/go-imap-move Index | Files

package move

import "github.com/emersion/go-imap-move"

Implements the IMAP MOVE Extension, defined in RFC 6851.

Index

Package Files

client.go command.go move.go server.go

Constants

const Capability = "MOVE"

The MOVE capability.

func NewExtension Uses

func NewExtension() server.Extension

type Client Uses

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

Client is a MOVE client.

func NewClient Uses

func NewClient(c *client.Client) *Client

NewClient creates a new client.

func (*Client) Move Uses

func (c *Client) Move(seqset *imap.SeqSet, dest string) error

Move moves the specified message(s) to the end of the specified destination mailbox.

func (*Client) MoveWithFallback Uses

func (c *Client) MoveWithFallback(seqset *imap.SeqSet, dest string) error

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 Uses

func (c *Client) SupportMove() (bool, error)

SupportMove checks if the server supports the MOVE extension.

func (*Client) UidMove Uses

func (c *Client) UidMove(seqset *imap.SeqSet, dest string) error

UidMove is identical to Move, but seqset is interpreted as containing unique identifiers instead of message sequence numbers.

func (*Client) UidMoveWithFallback Uses

func (c *Client) UidMoveWithFallback(seqset *imap.SeqSet, dest string) error

UidMoveWithFallback is identical to MoveWithFallback, but seqset is interpreted as containing unique identifiers instead of message sequence numbers.

type Command Uses

type Command struct {
    SeqSet  *imap.SeqSet
    Mailbox string
}

A MOVE command. See RFC 6851 section 3.1.

func (*Command) Command Uses

func (cmd *Command) Command() *imap.Command

func (*Command) Parse Uses

func (cmd *Command) Parse(fields []interface{}) (err error)

type Mailbox Uses

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.

Package move imports 6 packages (graph). Updated 2018-06-01. Refresh now. Tools for package owners.