Documentation ¶
Index ¶
- func NewWorker(worker *types.Worker) (types.Backend, error)
- type Container
- func (c *Container) CopyAll(dest maildir.Dir, src maildir.Dir, uids []uint32) error
- func (c *Container) DeleteAll(d maildir.Dir, uids []uint32) ([]uint32, error)
- func (c *Container) Dir(name string) maildir.Dir
- func (c *Container) ListFolders() ([]string, error)
- func (c *Container) Message(d maildir.Dir, uid uint32) (*Message, error)
- func (c *Container) OpenDirectory(name string) (maildir.Dir, error)
- func (c *Container) UIDs(d maildir.Dir) ([]uint32, error)
- type Message
- func (m Message) Flags() ([]maildir.Flag, error)
- func (m Message) Labels() ([]string, error)
- func (m Message) MarkReplied(answered bool) error
- func (m Message) MessageInfo() (*models.MessageInfo, error)
- func (m Message) ModelFlags() ([]models.Flag, error)
- func (m Message) NewBodyPartReader(requestedParts []int) (io.Reader, error)
- func (m Message) NewReader() (io.Reader, 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) UID() uint32
- type MsgParts
- type Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
NewContainer creates a new container at the specified directory
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) ListFolders ¶
ListFolders returns a list of maildir folders in the container
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.
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
A Message is an individual email inside of a maildir.Dir.
func (Message) MarkReplied ¶
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 ¶
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) SetOneFlag ¶
SetOneFlag enables or disables a single message flag on the message.