Documentation ¶
Index ¶
- func AppInfo(w http.ResponseWriter, r *http.Request)
- func DeleteMessages(w http.ResponseWriter, r *http.Request)
- func DownloadAttachment(w http.ResponseWriter, r *http.Request)
- func DownloadRaw(w http.ResponseWriter, r *http.Request)
- func GetMessage(w http.ResponseWriter, r *http.Request)
- func GetMessages(w http.ResponseWriter, r *http.Request)
- func Headers(w http.ResponseWriter, r *http.Request)
- func Search(w http.ResponseWriter, r *http.Request)
- func SetReadStatus(w http.ResponseWriter, r *http.Request)
- func SetTags(w http.ResponseWriter, r *http.Request)
- func Thumbnail(w http.ResponseWriter, r *http.Request)
- type Attachment
- type Message
- type MessageSummary
- type MessagesSummary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppInfo ¶
func AppInfo(w http.ResponseWriter, r *http.Request)
AppInfo returns some basic details about the running app, and latest release.
func DeleteMessages ¶
func DeleteMessages(w http.ResponseWriter, r *http.Request)
DeleteMessages (method: DELETE) deletes all messages matching IDS. If no IDs are provided then all messages are deleted.
func DownloadAttachment ¶
func DownloadAttachment(w http.ResponseWriter, r *http.Request)
DownloadAttachment (method: GET) returns the attachment data
func DownloadRaw ¶
func DownloadRaw(w http.ResponseWriter, r *http.Request)
DownloadRaw (method: GET) returns the full email source as plain text
func GetMessage ¶
func GetMessage(w http.ResponseWriter, r *http.Request)
GetMessage (method: GET) returns the *data.Message as JSON
func GetMessages ¶
func GetMessages(w http.ResponseWriter, r *http.Request)
GetMessages returns a paginated list of messages as JSON
func Headers ¶
func Headers(w http.ResponseWriter, r *http.Request)
Headers (method: GET) returns the message headers as JSON
func Search ¶
func Search(w http.ResponseWriter, r *http.Request)
Search returns up to 200 of the latest messages as JSON
func SetReadStatus ¶
func SetReadStatus(w http.ResponseWriter, r *http.Request)
SetReadStatus (method: PUT) will update the status to Read/Unread for all provided IDs
Types ¶
type MessageSummary ¶
type MessageSummary = storage.MessageSummary
MessageSummary - summary of a single message
type MessagesSummary ¶
type MessagesSummary struct { Total int `json:"total"` Unread int `json:"unread"` Count int `json:"count"` Start int `json:"start"` Tags []string `json:"tags"` Messages []MessageSummary `json:"messages"` }
MessagesSummary - summary of a list of messages