package backendutil
import "github.com/ncastellani/imapServer/backend/backendutil"
Package backendutil provides utility functions to implement IMAP backends.
Index ¶
- func FetchBodySection(e *message.Entity, section *imap.BodySectionName) (imap.Literal, error)
- func FetchBodyStructure(e *message.Entity, extended bool) (*imap.BodyStructure, error)
- func FetchEnvelope(h message.Header) (*imap.Envelope, error)
- func Match(e *message.Entity, c *imap.SearchCriteria) (bool, error)
- func MatchDate(date time.Time, c *imap.SearchCriteria) bool
- func MatchFlags(flags []string, c *imap.SearchCriteria) bool
- func MatchSeqNumAndUid(seqNum uint32, uid uint32, c *imap.SearchCriteria) bool
- func UpdateFlags(current []string, op imap.FlagsOp, flags []string) []string
Functions ¶
func FetchBodySection ¶
func FetchBodySection(e *message.Entity, section *imap.BodySectionName) (imap.Literal, error)
FetchBodySection extracts a body section from a message.
func FetchBodyStructure ¶
FetchBodyStructure computes a message's body structure from its content.
func FetchEnvelope ¶
func FetchEnvelope(h message.Header) (*imap.Envelope, error)
FetchEnvelope returns a message's envelope from its header.
func Match ¶
Match returns true if a message matches the provided criteria. Sequence number, UID, flag and internal date contrainsts are not checked.
func MatchDate ¶
MatchDate returns true if a date matches the provided criteria.
func MatchFlags ¶
MatchFlags returns true if a flag list matches the provided criteria.
func MatchSeqNumAndUid ¶
MatchSeqNumAndUid returns true if a sequence number and a UID matches the provided criteria.
func UpdateFlags ¶
UpdateFlags executes a flag operation on the flag set current.
Source Files ¶
backendutil.go body.go bodystructure.go envelope.go flags.go search.go
- Version
- v1.0.0-beta.1
- Published
- Feb 16, 2018
- Platform
- js/wasm
- Imports
- 9 packages
- Last checked
- 52 minutes ago –
Tools for package owners.