Documentation ¶
Index ¶
- Variables
- func FileSize(name string) (uint32, error)
- func FromMaildirFlags(maildirFlags []maildir.Flag) models.Flags
- func LimitHeaders(hdr *mail.Header, fields []string, exclude bool) *mail.Header
- func ParseFolderMap(r io.Reader) (map[string]string, []string, error)
- func Search(messages []rfc822.RawMessage, criteria *types.SearchCriteria) ([]models.UID, error)
- func SearchMessage(message rfc822.RawMessage, criteria *types.SearchCriteria, parts MsgParts) (bool, error)
- func Sort(messageInfos []*models.MessageInfo, criteria []*types.SortCriterion) ([]models.UID, error)
- func StripUIDFromMessageFilename(basename string) string
- func ToMaildirFlags(flags models.Flags) []maildir.Flag
- type MaildirStore
- type MsgParts
Constants ¶
This section is empty.
Variables ¶
View Source
var FlagToMaildir = map[models.Flags]maildir.Flag{ models.AnsweredFlag: maildir.FlagReplied, models.SeenFlag: maildir.FlagSeen, models.DeletedFlag: maildir.FlagTrashed, models.FlaggedFlag: maildir.FlagFlagged, models.DraftFlag: maildir.FlagDraft, models.ForwardedFlag: maildir.FlagPassed, }
View Source
var MaildirToFlag = map[maildir.Flag]models.Flags{ maildir.FlagReplied: models.AnsweredFlag, maildir.FlagSeen: models.SeenFlag, maildir.FlagTrashed: models.DeletedFlag, maildir.FlagFlagged: models.FlaggedFlag, maildir.FlagDraft: models.DraftFlag, maildir.FlagPassed: models.ForwardedFlag, }
Functions ¶
func FromMaildirFlags ¶
func LimitHeaders ¶
LimitHeaders returns a new Header with the specified headers included or excluded
func Search ¶
func Search(messages []rfc822.RawMessage, criteria *types.SearchCriteria) ([]models.UID, error)
func SearchMessage ¶
func SearchMessage(message rfc822.RawMessage, criteria *types.SearchCriteria, parts MsgParts, ) (bool, error)
searchMessage executes the search criteria for the given RawMessage, returns true if search succeeded
func Sort ¶
func Sort(messageInfos []*models.MessageInfo, criteria []*types.SortCriterion, ) ([]models.UID, error)
func ToMaildirFlags ¶
Types ¶
type MaildirStore ¶
type MaildirStore struct {
// contains filtered or unexported fields
}
func NewMaildirStore ¶
func NewMaildirStore(root string, maildirpp bool) (*MaildirStore, error)
func (*MaildirStore) Dir ¶
func (s *MaildirStore) Dir(name string) maildir.Dir
Folder returns a maildir.Dir with the specified name inside the Store
func (*MaildirStore) FolderMap ¶
func (s *MaildirStore) FolderMap() (map[string]maildir.Dir, error)
type MsgParts ¶
type MsgParts int
The parts of a message, kind of
const NONE MsgParts = 0
func GetRequiredParts ¶
func GetRequiredParts(criteria *types.SearchCriteria) MsgParts
Returns a bitmask of the parts of the message required to be loaded for the given criteria
Click to show internal directories.
Click to hide internal directories.