Documentation ¶
Overview ¶
Package apiv1 handles all the API responses
Index ¶
- func AppInfo(w http.ResponseWriter, _ *http.Request)
- func DeleteMessages(w http.ResponseWriter, r *http.Request)
- func DeleteSearch(w http.ResponseWriter, r *http.Request)
- func DownloadAttachment(w http.ResponseWriter, r *http.Request)
- func DownloadRaw(w http.ResponseWriter, r *http.Request)
- func GetHeaders(w http.ResponseWriter, r *http.Request)
- func GetMessage(w http.ResponseWriter, r *http.Request)
- func GetMessages(w http.ResponseWriter, r *http.Request)
- func GetOptions(w http.ResponseWriter, _ *http.Request)
- func GetTags(w http.ResponseWriter, _ *http.Request)
- func HTMLCheck(w http.ResponseWriter, r *http.Request)
- func LinkCheck(w http.ResponseWriter, r *http.Request)
- func ReleaseMessage(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)
- func WebUIConfig(w http.ResponseWriter, _ *http.Request)
- type Attachment
- type HTMLCheckResponse
- type LinkCheckResponse
- type Message
- type MessageSummary
- type MessagesSummary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppInfo ¶
func AppInfo(w http.ResponseWriter, _ *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.
func DeleteSearch ¶ added in v1.9.0
func DeleteSearch(w http.ResponseWriter, r *http.Request)
DeleteSearch will delete all messages matching a search
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 GetHeaders ¶ added in v1.5.0
func GetHeaders(w http.ResponseWriter, r *http.Request)
GetHeaders (method: GET) returns the message headers as JSON
func GetMessage ¶
func GetMessage(w http.ResponseWriter, r *http.Request)
GetMessage (method: GET) returns the Message as JSON
func GetMessages ¶
func GetMessages(w http.ResponseWriter, r *http.Request)
GetMessages returns a paginated list of messages as JSON
func GetOptions ¶ added in v1.6.9
func GetOptions(w http.ResponseWriter, _ *http.Request)
GetOptions returns a blank response
func GetTags ¶ added in v1.9.0
func GetTags(w http.ResponseWriter, _ *http.Request)
GetTags (method: GET) will get all tags currently in use
func HTMLCheck ¶ added in v1.8.0
func HTMLCheck(w http.ResponseWriter, r *http.Request)
HTMLCheck returns a summary of the HTML client support
func LinkCheck ¶ added in v1.8.2
func LinkCheck(w http.ResponseWriter, r *http.Request)
LinkCheck returns a summary of links in the email
func ReleaseMessage ¶ added in v1.6.0
func ReleaseMessage(w http.ResponseWriter, r *http.Request)
ReleaseMessage (method: POST) will release a message via a pre-configured external SMTP server. If no IDs are provided then all messages are updated.
func Search ¶
func Search(w http.ResponseWriter, r *http.Request)
Search returns 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 If no IDs are provided then all messages are updated.
func SetTags ¶ added in v1.2.8
func SetTags(w http.ResponseWriter, r *http.Request)
SetTags (method: PUT) will set the tags for all provided IDs
func Thumbnail ¶
func Thumbnail(w http.ResponseWriter, r *http.Request)
Thumbnail returns a thumbnail image for an attachment (images only)
func WebUIConfig ¶ added in v1.6.0
func WebUIConfig(w http.ResponseWriter, _ *http.Request)
WebUIConfig returns configuration settings for the web UI.
Types ¶
type HTMLCheckResponse ¶ added in v1.8.0
HTMLCheckResponse summary
type LinkCheckResponse ¶ added in v1.8.2
LinkCheckResponse summary
type MessageSummary ¶
type MessageSummary = storage.MessageSummary
MessageSummary - summary of a single message
type MessagesSummary ¶
type MessagesSummary struct { // Total number of messages in mailbox Total int `json:"total"` // Total number of unread messages in mailbox Unread int `json:"unread"` // Legacy - now undocumented in API specs but left for backwards compatibility. // Removed from API documentation 2023-07-12 // swagger:ignore Count int `json:"count"` // Total number of messages matching current query MessagesCount int `json:"messages_count"` // Pagination offset Start int `json:"start"` // All current tags Tags []string `json:"tags"` // Messages summary // in: body Messages []storage.MessageSummary `json:"messages"` }
MessagesSummary is a summary of a list of messages