apiv1

package
v1.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package apiv1 handles all the API responses

Index

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 GetAllTags added in v1.12.0

func GetAllTags(w http.ResponseWriter, _ *http.Request)

GetAllTags (method: GET) will get all tags currently in use

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 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.

func Search(w http.ResponseWriter, r *http.Request)

Search returns the latest messages as JSON

func SetMessageTags added in v1.12.0

func SetMessageTags(w http.ResponseWriter, r *http.Request)

SetMessageTags (method: PUT) will set the tags for all provided IDs

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 SpamAssassinCheck added in v1.13.0

func SpamAssassinCheck(w http.ResponseWriter, r *http.Request)

SpamAssassinCheck returns a summary of SpamAssassin results (if enabled)

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 Attachment

type Attachment = storage.Attachment

Attachment summary

type HTMLCheckResponse added in v1.8.0

type HTMLCheckResponse = htmlcheck.Response

HTMLCheckResponse summary

type LinkCheckResponse added in v1.8.2

type LinkCheckResponse = linkcheck.Response

LinkCheckResponse summary

type Message

type Message = storage.Message

Message data

type MessageSummary

type MessageSummary = storage.MessageSummary

MessageSummary - summary of a single message

type MessagesSummary

type MessagesSummary struct {
	// Total number of messages in mailbox
	Total float64 `json:"total"`

	// Total number of unread messages in mailbox
	Unread float64 `json:"unread"`

	// Legacy - now undocumented in API specs but left for backwards compatibility.
	// Removed from API documentation 2023-07-12
	// swagger:ignore
	Count float64 `json:"count"`

	// Total number of messages matching current query
	MessagesCount float64 `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

type SpamAssassinResponse added in v1.13.0

type SpamAssassinResponse = spamassassin.Result

SpamAssassinResponse summary

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL