Documentation ¶
Index ¶
- Constants
- func Envelope(header *rfc822.Header) (string, error)
- func IsCapabilityAvailableBeforeAuth(c Capability) bool
- func NewContextWithIMAPID(ctx context.Context, id IMAPID) context.Context
- func Structure(section *rfc822.Section) (string, string, error)
- type Capability
- type Field
- type FlagSet
- func (fs FlagSet) Add(flags ...string) FlagSet
- func (fs FlagSet) AddFlagSet(set FlagSet) FlagSet
- func (fs FlagSet) AddFlagSetToSelf(set FlagSet)
- func (fs FlagSet) AddToSelf(flags ...string)
- func (fs FlagSet) Clone() FlagSet
- func (fs FlagSet) Contains(flag string) bool
- func (fs FlagSet) ContainsAll(flags ...string) bool
- func (fs FlagSet) ContainsAny(flags ...string) bool
- func (fs FlagSet) ContainsUnchecked(flag string) bool
- func (fs FlagSet) Equals(otherFs FlagSet) bool
- func (fs FlagSet) Len() int
- func (fs FlagSet) Remove(flags ...string) FlagSet
- func (fs FlagSet) RemoveFlagSet(set FlagSet) FlagSet
- func (fs FlagSet) RemoveFlagSetFromSelf(set FlagSet)
- func (fs FlagSet) RemoveFromSelf(flags ...string)
- func (fs FlagSet) Set(flag string, on bool) FlagSet
- func (fs FlagSet) SetOnSelf(flag string, on bool)
- func (fs FlagSet) ToSlice() []string
- type Header
- type IMAPID
- type InternalMailboxID
- type InternalMessageID
- type Mailbox
- type MailboxCreated
- type MailboxDeleted
- type MailboxID
- type MailboxIDChanged
- type MailboxUpdated
- type Message
- type MessageCreated
- type MessageDeleted
- type MessageFlagsUpdated
- type MessageID
- type MessageIDChanged
- type MessageMailboxesUpdated
- type MessageUpdated
- type MessagesCreated
- type Noop
- type ParsedMessage
- type SeqID
- type SeqSet
- type SeqVal
- type UID
- type UIDValidityBumped
- type Update
- type Waiter
Constants ¶
const ( AttrNoSelect = `\Noselect` AttrNoInferiors = `\Noinferiors` AttrMarked = `\Marked` AttrUnmarked = `\Unmarked` // Special Use attributes as defined in RFC-6154. AttrAll = `\All` AttrArchive = `\Archive` AttrDrafts = `\Drafts` AttrFlagged = `\Flagged` AttrJunk = `\Junk` AttrSent = `\Sent` AttrTrash = `\Trash` )
const ( FlagSeen = `\Seen` FlagAnswered = `\Answered` FlagFlagged = `\Flagged` FlagDeleted = `\Deleted` FlagDraft = `\Draft` FlagRecent = `\Recent` // Read-only!. )
const ( FlagSeenLowerCase = `\seen` FlagAnsweredLowerCase = `\answered` FlagFlaggedLowerCase = `\flagged` FlagDeletedLowerCase = `\deleted` FlagDraftLowerCase = `\draft` FlagRecentLowerCase = `\recent` // Read-only!. )
const ( IDKeyName = "name" IDKeyVersion = "version" IDKeyOS = "os" IdKeyOSVersion = "os-version" IDKeyVendor = "vendor" IDKeySupportURL = "support-url" IDKeyAddress = "address" IDKeyDate = "date" IDKeyCommand = "command" IDKeyArguments = "arguments" IDKeyEnvironment = "environment" IMAPIDConnMetadataKey = "rfc2971-id" )
const ( StatusMessages = `MESSAGES` StatusRecent = `RECENT` StatusUIDNext = `UIDNEXT` StatusUIDValidity = `UIDVALIDITY` StatusUnseen = `UNSEEN` )
const Inbox = "INBOX"
Variables ¶
This section is empty.
Functions ¶
func IsCapabilityAvailableBeforeAuth ¶ added in v0.12.0
func IsCapabilityAvailableBeforeAuth(c Capability) bool
func NewContextWithIMAPID ¶ added in v0.8.0
Types ¶
type Capability ¶
type Capability string
const ( IMAP4rev1 Capability = `IMAP4rev1` StartTLS Capability = `STARTTLS` IDLE Capability = `IDLE` UNSELECT Capability = `UNSELECT` UIDPLUS Capability = `UIDPLUS` MOVE Capability = `MOVE` )
type FlagSet ¶
FlagSet represents a set of IMAP flags. Flags are case-insensitive and no duplicates are allowed.
func NewFlagSet ¶
NewFlagSet creates a flag set containing the specified flags.
func NewFlagSetFromSlice ¶
NewFlagSetFromSlice creates a flag set containing the flags from a slice.
func NewFlagSetWithCapacity ¶ added in v0.12.0
func (FlagSet) Add ¶
Add adds new flags to the flag set. The function returns false iff no flags was actually added because they're already in the set. The case of existing elements is preserved.
func (FlagSet) AddFlagSet ¶
func (FlagSet) AddFlagSetToSelf ¶ added in v0.12.0
func (FlagSet) ContainsAll ¶
ContainsAll returns true if and only if all of the flags are in the set.
func (FlagSet) ContainsAny ¶
ContainsAny returns true if and only if any of the flags are in the set.
func (FlagSet) ContainsUnchecked ¶ added in v0.12.0
ContainsUnchecked returns true if and only if the flag is in the set. The flag is not converted to lower case. This is useful for cases where we need to check flags in bulk.
func (FlagSet) Equals ¶
Equals returns true if and only if the two sets are equal (same number of elements and each element of fs is also in otherFs).
func (FlagSet) RemoveFlagSet ¶
func (FlagSet) RemoveFlagSetFromSelf ¶ added in v0.12.0
func (FlagSet) RemoveFromSelf ¶ added in v0.12.0
func (FlagSet) SetOnSelf ¶ added in v0.12.0
SetOnSelf ensures the flagset either contains or does not contain the given flag.
type IMAPID ¶ added in v0.12.0
type IMAPID struct { Name string Version string OS string OSVersion string Vendor string SupportURL string Address string Date string Command string Arguments string Environment string Other map[string]string }
IMAPID represents the RFC 2971 IMAP IMAPID Extension. This information can be retrieved by the connector at the context level. To do so please use the provided GetIMAPIDFromContext() function.
func GetIMAPIDFromContext ¶ added in v0.8.0
func NewIMAPIDFromKeyMap ¶ added in v0.8.0
func NewIMAPIDFromVersionInfo ¶ added in v0.8.0
type InternalMailboxID ¶ added in v0.11.0
type InternalMailboxID uint64
func (InternalMailboxID) ShortID ¶ added in v0.11.0
func (i InternalMailboxID) ShortID() string
func (InternalMailboxID) String ¶ added in v0.12.0
func (i InternalMailboxID) String() string
type InternalMessageID ¶ added in v0.11.0
type InternalMessageID uint64
func InternalMessageIDFromString ¶ added in v0.12.0
func InternalMessageIDFromString(id string) (InternalMessageID, error)
func (InternalMessageID) ShortID ¶ added in v0.11.0
func (i InternalMessageID) ShortID() string
func (InternalMessageID) String ¶ added in v0.12.0
func (i InternalMessageID) String() string
func (InternalMessageID) ToBytes ¶ added in v0.12.0
func (i InternalMessageID) ToBytes() []byte
type MailboxCreated ¶
type MailboxCreated struct { Mailbox Mailbox // contains filtered or unexported fields }
func NewMailboxCreated ¶
func NewMailboxCreated(mailbox Mailbox) *MailboxCreated
func (*MailboxCreated) String ¶
func (u *MailboxCreated) String() string
func (MailboxCreated) WaitContext ¶ added in v0.12.0
type MailboxDeleted ¶
type MailboxDeleted struct { MailboxID MailboxID // contains filtered or unexported fields }
func NewMailboxDeleted ¶
func NewMailboxDeleted(mailboxID MailboxID) *MailboxDeleted
func (*MailboxDeleted) String ¶
func (u *MailboxDeleted) String() string
func (MailboxDeleted) WaitContext ¶ added in v0.12.0
type MailboxIDChanged ¶
type MailboxIDChanged struct { InternalID InternalMailboxID RemoteID MailboxID // contains filtered or unexported fields }
func NewMailboxIDChanged ¶
func NewMailboxIDChanged(internalID InternalMailboxID, remoteID MailboxID) *MailboxIDChanged
func (*MailboxIDChanged) String ¶
func (u *MailboxIDChanged) String() string
func (MailboxIDChanged) WaitContext ¶ added in v0.12.0
type MailboxUpdated ¶
type MailboxUpdated struct { MailboxID MailboxID MailboxName []string // contains filtered or unexported fields }
func NewMailboxUpdated ¶
func NewMailboxUpdated(mailboxID MailboxID, mailboxName []string) *MailboxUpdated
func (*MailboxUpdated) String ¶
func (u *MailboxUpdated) String() string
func (MailboxUpdated) WaitContext ¶ added in v0.12.0
type MessageCreated ¶
type MessageCreated struct { Message Message Literal []byte MailboxIDs []MailboxID ParsedMessage *ParsedMessage }
type MessageDeleted ¶ added in v0.8.1
type MessageDeleted struct { MessageID MessageID // contains filtered or unexported fields }
func NewMessagesDeleted ¶ added in v0.8.1
func NewMessagesDeleted(messageID MessageID) *MessageDeleted
func (*MessageDeleted) String ¶ added in v0.8.1
func (u *MessageDeleted) String() string
func (MessageDeleted) WaitContext ¶ added in v0.12.0
type MessageFlagsUpdated ¶ added in v0.12.0
type MessageFlagsUpdated struct { MessageID MessageID Seen, Flagged bool // contains filtered or unexported fields }
func NewMessageFlagsUpdated ¶ added in v0.12.0
func NewMessageFlagsUpdated(messageID MessageID, seen, flagged bool) *MessageFlagsUpdated
func (*MessageFlagsUpdated) String ¶ added in v0.12.0
func (u *MessageFlagsUpdated) String() string
func (MessageFlagsUpdated) WaitContext ¶ added in v0.12.0
type MessageIDChanged ¶
type MessageIDChanged struct { InternalID InternalMessageID RemoteID MessageID // contains filtered or unexported fields }
func NewMessageIDChanged ¶
func NewMessageIDChanged(internalID InternalMessageID, remoteID MessageID) *MessageIDChanged
func (*MessageIDChanged) String ¶
func (u *MessageIDChanged) String() string
func (MessageIDChanged) WaitContext ¶ added in v0.12.0
type MessageMailboxesUpdated ¶ added in v0.13.0
type MessageMailboxesUpdated struct { MessageID MessageID MailboxIDs []MailboxID Seen, Flagged bool // contains filtered or unexported fields }
func NewMessageMailboxesUpdated ¶ added in v0.13.0
func NewMessageMailboxesUpdated(messageID MessageID, mailboxIDs []MailboxID, seen, flagged bool) *MessageMailboxesUpdated
func (*MessageMailboxesUpdated) String ¶ added in v0.13.0
func (u *MessageMailboxesUpdated) String() string
func (MessageMailboxesUpdated) WaitContext ¶ added in v0.13.0
type MessageUpdated ¶
type MessageUpdated struct { Message Message Literal []byte MailboxIDs []MailboxID ParsedMessage *ParsedMessage // contains filtered or unexported fields }
MessageUpdated replaces the previous behavior of MessageDelete followed by MessageCreate. Furthermore, it guarantees that the operation is executed atomically.
func NewMessageUpdated ¶
func NewMessageUpdated(message Message, literal []byte, mailboxIDs []MailboxID, parsedMessage *ParsedMessage) *MessageUpdated
func (*MessageUpdated) String ¶
func (u *MessageUpdated) String() string
func (MessageUpdated) WaitContext ¶ added in v0.14.0
type MessagesCreated ¶ added in v0.7.0
type MessagesCreated struct { Messages []*MessageCreated // contains filtered or unexported fields }
func NewMessagesCreated ¶ added in v0.7.0
func NewMessagesCreated(updates ...*MessageCreated) *MessagesCreated
func (*MessagesCreated) String ¶ added in v0.7.0
func (u *MessagesCreated) String() string
func (MessagesCreated) WaitContext ¶ added in v0.12.0
type Noop ¶ added in v0.12.0
type Noop struct {
// contains filtered or unexported fields
}
func (Noop) WaitContext ¶ added in v0.12.0
type ParsedMessage ¶ added in v0.12.0
func NewParsedMessage ¶ added in v0.12.0
func NewParsedMessage(literal []byte) (*ParsedMessage, error)
type UIDValidityBumped ¶ added in v0.14.0
type UIDValidityBumped struct { UIDValidity UID // contains filtered or unexported fields }
func NewUIDValidityBumped ¶ added in v0.14.0
func NewUIDValidityBumped(validity UID) *UIDValidityBumped
func (*UIDValidityBumped) String ¶ added in v0.14.0
func (u *UIDValidityBumped) String() string
func (UIDValidityBumped) WaitContext ¶ added in v0.14.0
Source Files ¶
- attributes.go
- capabilities.go
- envelope.go
- flags.go
- id.go
- mailbox.go
- message.go
- params.go
- seqset.go
- status.go
- strong_types.go
- structure.go
- update.go
- update_mailbox_created.go
- update_mailbox_deleted.go
- update_mailbox_id_changed.go
- update_mailbox_updated.go
- update_message_created.go
- update_message_deleted.go
- update_message_flags_updated.go
- update_message_id_changed.go
- update_message_labels_updated.go
- update_message_updated.go
- update_noop.go
- update_uid_validity_bumped.go
- update_waiter.go