Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWorker

func NewWorker(worker *types.Worker) (types.Backend, error)

    NewWorker creates a new maildir worker with the provided worker.

    Types

    type Container

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

      A Container is a directory which contains other directories which adhere to the Maildir spec

      func NewContainer

      func NewContainer(dir string, l *log.Logger) (*Container, error)

        NewContainer creates a new container at the specified directory

        func (*Container) CopyAll

        func (c *Container) CopyAll(
        	dest maildir.Dir, src maildir.Dir, uids []uint32) error

        func (*Container) DeleteAll

        func (c *Container) DeleteAll(d maildir.Dir, uids []uint32) ([]uint32, error)

          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) Dir

          func (c *Container) Dir(name string) maildir.Dir

            Dir returns a maildir.Dir with the specified name inside the container

            func (*Container) ListFolders

            func (c *Container) ListFolders() ([]string, error)

              ListFolders returns a list of maildir folders in the container

              func (*Container) Message

              func (c *Container) Message(d maildir.Dir, uid uint32) (*Message, error)

                Message returns a Message struct for the given UID and maildir

                func (*Container) OpenDirectory

                func (c *Container) OpenDirectory(name string) (maildir.Dir, error)

                  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) UIDs

                  func (c *Container) UIDs(d maildir.Dir) ([]uint32, error)

                    UIDs fetches the unique message identifiers for the maildir

                    type Message

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

                      A Message is an individual email inside of a maildir.Dir.

                      func (Message) Flags

                      func (m Message) Flags() ([]maildir.Flag, error)

                        Flags fetches the set of flags currently applied to the message.

                        func (Message) Labels

                        func (m Message) Labels() ([]string, error)

                        func (Message) MarkReplied

                        func (m Message) MarkReplied(answered bool) error

                          MarkReplied either adds or removes the maildir.FlagReplied flag from the message.

                          func (Message) MessageInfo

                          func (m Message) MessageInfo() (*models.MessageInfo, error)

                            MessageInfo populates a models.MessageInfo struct for the message.

                            func (Message) ModelFlags

                            func (m Message) ModelFlags() ([]models.Flag, error)

                              ModelFlags fetches the set of models.flags currently applied to the message.

                              func (Message) NewBodyPartReader

                              func (m Message) NewBodyPartReader(requestedParts []int) (io.Reader, error)

                                NewBodyPartReader creates a new io.Reader for the requested body part(s) of the message.

                                func (Message) NewReader

                                func (m Message) NewReader() (io.Reader, error)

                                  NewReader reads a message into memory and returns an io.Reader for it.

                                  func (Message) Remove

                                  func (m Message) Remove() error

                                    Remove deletes the email immediately.

                                    func (Message) SetFlags

                                    func (m Message) SetFlags(flags []maildir.Flag) error

                                      SetFlags replaces the message's flags with a new set.

                                      func (Message) SetOneFlag

                                      func (m Message) SetOneFlag(flag maildir.Flag, enable bool) error

                                        SetOneFlag enables or disables a single message flag on the message.

                                        func (Message) UID

                                        func (m Message) UID() uint32

                                        type MsgParts

                                        type MsgParts int

                                          The parts of a message, kind of

                                          const (
                                          	FLAGS MsgParts = 1 << iota
                                          	HEADER
                                          	BODY
                                          	ALL
                                          )
                                          const NONE MsgParts = 0

                                          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) Run

                                            func (w *Worker) Run()

                                              Run starts the worker's message handling loop.