Documentation ¶
Index ¶
- func NewMaildirppWorker(worker *types.Worker) (types.Backend, error)
- func NewWorker(worker *types.Worker) (types.Backend, error)
- type Container
- func (c *Container) ClearRecentFlag(uid models.UID)
- func (c *Container) CopyAll(dest maildir.Dir, src maildir.Dir, uids []models.UID) error
- func (c *Container) DeleteAll(d maildir.Dir, uids []models.UID) ([]models.UID, error)
- func (c *Container) IsRecent(uid models.UID) bool
- func (c *Container) Message(d maildir.Dir, uid models.UID) (*Message, error)
- func (c *Container) MoveAll(dest maildir.Dir, src maildir.Dir, uids []models.UID) ([]models.UID, error)
- func (c *Container) OpenDirectory(name string) (maildir.Dir, error)
- func (c *Container) SyncNewMail(dir maildir.Dir) error
- func (c *Container) UIDs(d maildir.Dir) ([]models.UID, error)
- type Message
- func (m Message) Flags() ([]maildir.Flag, error)
- func (m Message) Labels() ([]string, error)
- func (m Message) MarkForwarded(forwarded bool) error
- func (m Message) MarkReplied(answered bool) error
- func (m Message) MessageHeaders() (*models.MessageInfo, error)
- func (m Message) MessageInfo() (*models.MessageInfo, error)
- func (m Message) ModelFlags() (models.Flags, error)
- func (m Message) NewBodyPartReader(requestedParts []int) (io.Reader, error)
- func (m Message) NewReader() (io.ReadCloser, error)
- func (m Message) Remove() error
- func (m Message) SetFlags(flags []maildir.Flag) error
- func (m Message) SetOneFlag(flag maildir.Flag, enable bool) error
- func (m Message) Size() (uint32, error)
- func (m Message) UID() models.UID
- type Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMaildirppWorker ¶
NewMaildirppWorker creates a new Maildir++ worker with the provided worker.
Types ¶
type Container ¶
type Container struct { Store *lib.MaildirStore // contains filtered or unexported fields }
A Container is a directory which contains other directories which adhere to the Maildir spec
func NewContainer ¶
NewContainer creates a new container at the specified directory
func (*Container) ClearRecentFlag ¶
ClearRecentFlag removes the Recent flag from the message with the given uid
func (*Container) DeleteAll ¶
DeleteAll deletes a set of messages by UID and returns the subset of UIDs which were successfully deleted, stopping upon the first error.
func (*Container) OpenDirectory ¶
OpenDirectory opens an existing maildir in the container by name, moves new messages into cur, and registers the new keys in the UIDStore.
func (*Container) SyncNewMail ¶
SyncNewMail adds emails from new to cur, tracking them
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
A Message is an individual email inside of a maildir.Dir.
func (Message) MarkForwarded ¶
MarkForwarded either adds or removes the maildir.FlagForwarded flag from the message.
func (Message) MarkReplied ¶
MarkReplied either adds or removes the maildir.FlagReplied flag from the message.
func (Message) MessageHeaders ¶
func (m Message) MessageHeaders() (*models.MessageInfo, error)
MessageHeaders populates a models.MessageInfo struct for the message with minimal information, used for sorting and threading.
func (Message) MessageInfo ¶
func (m Message) MessageInfo() (*models.MessageInfo, error)
MessageInfo populates a models.MessageInfo struct for the message.
func (Message) ModelFlags ¶
ModelFlags fetches the set of models.flags currently applied to the message.
func (Message) NewBodyPartReader ¶
NewBodyPartReader creates a new io.Reader for the requested body part(s) of the message.
func (Message) NewReader ¶
func (m Message) NewReader() (io.ReadCloser, error)
NewReader reads a message into memory and returns an io.Reader for it.
func (Message) SetOneFlag ¶
SetOneFlag enables or disables a single message flag on the message.
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
A Worker handles interfacing between aerc's UI and a group of maildirs.
func (*Worker) Capabilities ¶
func (w *Worker) Capabilities() *models.Capabilities