Documentation ¶
Index ¶
- Constants
- func Envelope(header *rfc822.Header) (string, error)
- func NewContextWithIMAPID(ctx context.Context, id ID) context.Context
- func Structure(section *rfc822.Section, ext bool) (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) Contains(flag string) bool
- func (fs FlagSet) ContainsAll(flags ...string) bool
- func (fs FlagSet) ContainsAny(flags ...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) Set(flag string, on bool) FlagSet
- func (fs FlagSet) ToSlice() []string
- type Header
- type ID
- type Mailbox
- type MailboxCreated
- type MailboxDeleted
- type MailboxIDChanged
- type MailboxUpdated
- type Message
- type MessageCreated
- type MessageDeleted
- type MessageIDChanged
- type MessageUpdated
- type MessagesCreated
- type SeqSet
- type SeqVal
- type Update
- type Waiter
Constants ¶
const ( AttrNoSelect = `\Noselect` AttrNoInferiors = `\Noinferiors` AttrMarked = `\Marked` AttrUnmarked = `\Unmarked` )
const ( FlagSeen = `\Seen` FlagAnswered = `\Answered` FlagFlagged = `\Flagged` FlagDeleted = `\Deleted` FlagDraft = `\Draft` FlagRecent = `\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 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 (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) 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) 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) Remove ¶
Remove removes a list of flags from the set. The function returns false iif no flag was actually removed.
func (FlagSet) RemoveFlagSet ¶
type ID ¶ added in v0.8.0
type ID 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 }
ID represents the RFC 2971 IMAP ID 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
func NewIMAPIDFromVersionInfo(info *internal.VersionInfo) ID
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
type MailboxDeleted ¶
type MailboxDeleted struct { MailboxID string // contains filtered or unexported fields }
func NewMailboxDeleted ¶
func NewMailboxDeleted(mailboxID string) *MailboxDeleted
func (*MailboxDeleted) String ¶
func (u *MailboxDeleted) String() string
type MailboxIDChanged ¶
type MailboxIDChanged struct { OldID string NewID string // contains filtered or unexported fields }
func NewMailboxIDChanged ¶
func NewMailboxIDChanged(oldID, newID string) *MailboxIDChanged
func (*MailboxIDChanged) String ¶
func (u *MailboxIDChanged) String() string
type MailboxUpdated ¶
type MailboxUpdated struct { MailboxID string MailboxName []string // contains filtered or unexported fields }
func NewMailboxUpdated ¶
func NewMailboxUpdated(mailboxID string, mailboxName []string) *MailboxUpdated
func (*MailboxUpdated) String ¶
func (u *MailboxUpdated) String() string
type MessageCreated ¶
type MessageDeleted ¶ added in v0.8.1
type MessageDeleted struct { MessageID string // contains filtered or unexported fields }
func NewMessagesDeleted ¶ added in v0.8.1
func NewMessagesDeleted(messageID string) *MessageDeleted
func (*MessageDeleted) String ¶ added in v0.8.1
func (u *MessageDeleted) String() string
type MessageIDChanged ¶
type MessageIDChanged struct { OldID string NewID string // contains filtered or unexported fields }
func NewMessageIDChanged ¶
func NewMessageIDChanged(oldID, newID string) *MessageIDChanged
func (*MessageIDChanged) String ¶
func (u *MessageIDChanged) String() string
type MessageUpdated ¶
type MessageUpdated struct { MessageID string MailboxIDs []string Seen, Flagged bool // contains filtered or unexported fields }
func NewMessageUpdated ¶
func NewMessageUpdated(messageID string, mailboxIDs []string, seen, flagged bool) *MessageUpdated
func (*MessageUpdated) String ¶
func (u *MessageUpdated) String() string
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() *MessagesCreated
func (*MessagesCreated) Add ¶ added in v0.7.0
func (u *MessagesCreated) Add(message Message, literal []byte, mailboxIDs []string) error
func (*MessagesCreated) String ¶ added in v0.7.0
func (u *MessagesCreated) String() string
Source Files ¶
- attributes.go
- capabilities.go
- envelope.go
- flags.go
- id.go
- mailbox.go
- message.go
- params.go
- seqset.go
- status.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_id_changed.go
- update_message_updated.go
- update_waiter.go