move

package module
v0.0.0-...-fe4558f Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: MIT Imports: 6 Imported by: 9

README

go-imap-move

GoDoc

MOVE extension for go-imap.

This extension has been merged into go-imap. Use built-in support instead of this repository!

License

MIT

Documentation

Overview

Implements the IMAP MOVE Extension, defined in RFC 6851.

Index

Constants

View Source
const Capability = "MOVE"

The MOVE capability.

Variables

This section is empty.

Functions

func NewExtension

func NewExtension() server.Extension

Types

type Client

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

Client is a MOVE client.

func NewClient

func NewClient(c *client.Client) *Client

NewClient creates a new client.

func (*Client) Move

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

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

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

SupportMove checks if the server supports the MOVE extension.

func (*Client) UidMove

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

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

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

A MOVE command. See RFC 6851 section 3.1.

func (*Command) Command

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

func (*Command) Parse

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

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.

Jump to

Keyboard shortcuts

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