Documentation ¶
Index ¶
- Variables
- func RegisterViewer(viewer Viewer)
- type Attachment
- type ComposeRenderData
- type IMAPMessage
- func (msg *IMAPMessage) Attachments() []IMAPPartNode
- func (msg *IMAPMessage) HasFlag(flag string) bool
- func (msg *IMAPMessage) PartByID(id string) *IMAPPartNode
- func (msg *IMAPMessage) PartByPath(path []int) *IMAPPartNode
- func (msg *IMAPMessage) PartTree() *IMAPPartNode
- func (msg *IMAPMessage) TextPartName() string
- func (msg *IMAPMessage) URL() *url.URL
- type IMAPPartNode
- type MailboxInfo
- type MailboxRenderData
- type MailboxStatus
- type MessageRenderData
- type OutgoingMessage
- type Settings
- type SettingsRenderData
- 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 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 ComposeRenderData ¶
type ComposeRenderData struct { koushin.BaseRenderData Message *OutgoingMessage }
type IMAPMessage ¶
type IMAPMessage struct { *imap.Message Mailbox string }
func (*IMAPMessage) Attachments ¶
func (msg *IMAPMessage) Attachments() []IMAPPartNode
func (*IMAPMessage) HasFlag ¶
func (msg *IMAPMessage) HasFlag(flag string) 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) TextPartName ¶
func (msg *IMAPMessage) TextPartName() string
func (*IMAPMessage) URL ¶
func (msg *IMAPMessage) URL() *url.URL
type IMAPPartNode ¶
type IMAPPartNode struct { Path []int MIMEType string Filename string Children []IMAPPartNode Message *IMAPMessage }
func (IMAPPartNode) IsText ¶
func (node IMAPPartNode) IsText() bool
func (IMAPPartNode) PathString ¶
func (node IMAPPartNode) PathString() string
func (IMAPPartNode) String ¶
func (node IMAPPartNode) String() string
type MailboxInfo ¶
type MailboxInfo struct {
*imap.MailboxInfo
}
func (*MailboxInfo) URL ¶
func (mbox *MailboxInfo) URL() *url.URL
type MailboxRenderData ¶
type MailboxRenderData struct { koushin.BaseRenderData Mailbox *MailboxStatus Mailboxes []MailboxInfo Messages []IMAPMessage PrevPage, NextPage int Query string }
type MailboxStatus ¶
type MailboxStatus struct {
*imap.MailboxStatus
}
func (*MailboxStatus) URL ¶
func (mbox *MailboxStatus) URL() *url.URL
type MessageRenderData ¶
type MessageRenderData struct { koushin.BaseRenderData Mailboxes []MailboxInfo Mailbox *MailboxStatus Message *IMAPMessage Part *IMAPPartNode View interface{} MailboxPage int Flags map[string]bool }
type OutgoingMessage ¶
type OutgoingMessage struct { From string To []string Subject string InReplyTo string Text string Attachments []Attachment }
func (*OutgoingMessage) ToString ¶
func (msg *OutgoingMessage) ToString() string
type SettingsRenderData ¶
type SettingsRenderData struct { koushin.BaseRenderData Settings *Settings }
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(*koushin.Context, *IMAPMessage, *message.Entity) (interface{}, error) }
Viewer is a message part viewer.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.