Documentation
¶
Index ¶
- Variables
- func PrepareSearch(terms string) *imap.SearchCriteria
- func RegisterViewer(viewer Viewer)
- type Attachment
- type CategorizedMailboxes
- type ComposeRenderData
- type IMAPBaseRenderData
- type IMAPMessage
- func (msg *IMAPMessage) Attachments() []IMAPPartNode
- func (msg *IMAPMessage) HTMLPart() *IMAPPartNode
- func (msg *IMAPMessage) HasFlag(flag imap.Flag) bool
- func (msg *IMAPMessage) PartByID(id string) *IMAPPartNode
- func (msg *IMAPMessage) PartByPath(path []int) *IMAPPartNode
- func (msg *IMAPMessage) PartTree() *IMAPPartNode
- func (msg *IMAPMessage) TextPart() *IMAPPartNode
- func (msg *IMAPMessage) URL() *url.URL
- type IMAPPartNode
- type MailboxDetails
- type MailboxInfo
- type MailboxRenderData
- type MailboxStatus
- type MessageRenderData
- type NewMailboxRenderData
- type OutgoingMessage
- type Settings
- type SettingsRenderData
- type Subscriptions
- type Viewer
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrViewUnsupported = fmt.Errorf("cannot generate message view: unsupported part")
ErrViewUnsupported is returned by Viewer.ViewMessagePart when the message part isn't supported.
Functions ¶
func PrepareSearch ¶
func PrepareSearch(terms string) *imap.SearchCriteria
TODO: Document search functionality somewhere
func RegisterViewer ¶
func RegisterViewer(viewer Viewer)
RegisterViewer registers a message part viewer.
Types ¶
type Attachment ¶
type Attachment interface { MIMEType() string Filename() string Open() (io.ReadCloser, error) }
type CategorizedMailboxes ¶
type CategorizedMailboxes struct { Common struct { Inbox *MailboxDetails Drafts *MailboxDetails Sent *MailboxDetails Junk *MailboxDetails Trash *MailboxDetails Archive *MailboxDetails } Additional []MailboxDetails }
Organizes mailboxes into common/uncommon categories
func (*CategorizedMailboxes) Append ¶
func (cc *CategorizedMailboxes) Append(mi MailboxInfo, status *MailboxStatus)
type ComposeRenderData ¶
type ComposeRenderData struct { IMAPBaseRenderData Message *OutgoingMessage }
type IMAPBaseRenderData ¶
type IMAPBaseRenderData struct { alps.BaseRenderData CategorizedMailboxes CategorizedMailboxes Mailboxes []MailboxInfo Mailbox *MailboxStatus Inbox *MailboxStatus Subscriptions map[string]*MailboxStatus }
type IMAPMessage ¶
type IMAPMessage struct { *imapclient.FetchMessageBuffer Mailbox string }
func (*IMAPMessage) Attachments ¶
func (msg *IMAPMessage) Attachments() []IMAPPartNode
func (*IMAPMessage) HTMLPart ¶
func (msg *IMAPMessage) HTMLPart() *IMAPPartNode
func (*IMAPMessage) HasFlag ¶
func (msg *IMAPMessage) HasFlag(flag imap.Flag) bool
func (*IMAPMessage) PartByID ¶
func (msg *IMAPMessage) PartByID(id string) *IMAPPartNode
func (*IMAPMessage) PartByPath ¶
func (msg *IMAPMessage) PartByPath(path []int) *IMAPPartNode
func (*IMAPMessage) PartTree ¶
func (msg *IMAPMessage) PartTree() *IMAPPartNode
func (*IMAPMessage) TextPart ¶
func (msg *IMAPMessage) TextPart() *IMAPPartNode
func (*IMAPMessage) URL ¶
func (msg *IMAPMessage) URL() *url.URL
type IMAPPartNode ¶
type IMAPPartNode struct { Path []int MIMEType string Filename string Children []IMAPPartNode Message *IMAPMessage Size uint32 }
func (IMAPPartNode) IsText ¶
func (node IMAPPartNode) IsText() bool
func (IMAPPartNode) PathString ¶
func (node IMAPPartNode) PathString() string
func (IMAPPartNode) SizeString ¶
func (node IMAPPartNode) SizeString() string
func (IMAPPartNode) String ¶
func (node IMAPPartNode) String() string
type MailboxDetails ¶
type MailboxDetails struct { Info *MailboxInfo Status *MailboxStatus }
type MailboxInfo ¶
func (*MailboxInfo) HasAttr ¶
func (mbox *MailboxInfo) HasAttr(flag string) bool
func (*MailboxInfo) Name ¶
func (mbox *MailboxInfo) Name() string
func (*MailboxInfo) URL ¶
func (mbox *MailboxInfo) URL() *url.URL
type MailboxRenderData ¶
type MailboxRenderData struct { IMAPBaseRenderData Messages []IMAPMessage PrevPage, NextPage int Query string }
type MailboxStatus ¶
type MailboxStatus struct {
*imap.StatusData
}
func (*MailboxStatus) Name ¶
func (mbox *MailboxStatus) Name() string
func (*MailboxStatus) URL ¶
func (mbox *MailboxStatus) URL() *url.URL
type MessageRenderData ¶
type MessageRenderData struct { IMAPBaseRenderData Message *IMAPMessage Part *IMAPPartNode View interface{} MailboxPage int Flags map[imap.Flag]bool }
type NewMailboxRenderData ¶
type NewMailboxRenderData struct { IMAPBaseRenderData Error string }
type OutgoingMessage ¶
type OutgoingMessage struct { From string To []string Cc []string Bcc []string Subject string MessageID string InReplyTo string Text string Attachments []Attachment }
func (*OutgoingMessage) ToString ¶
func (msg *OutgoingMessage) ToString() string
type SettingsRenderData ¶
type SettingsRenderData struct { alps.BaseRenderData Mailboxes []MailboxInfo Settings *Settings Subscriptions Subscriptions }
type Subscriptions ¶
type Subscriptions []string
func (Subscriptions) Has ¶
func (s Subscriptions) Has(sub string) bool
type Viewer ¶
type Viewer interface { // ViewMessagePart renders a message part. The returned value is displayed // in a template. ErrViewUnsupported is returned if the message part isn't // supported. ViewMessagePart(*alps.Context, *IMAPMessage, *message.Entity) (interface{}, error) }
Viewer is a message part viewer.
Click to show internal directories.
Click to hide internal directories.