mirror of
https://github.com/axllent/mailpit.git
synced 2025-01-28 03:56:50 +02:00
04462f76c6
This enables a SMTP server to be configured, and messages to be manually "released" via the relay server. Aditionally, messages can be auto-relayed via the SMTP server do Mailpit acts as a form of caching proxy. @see #29
92 lines
1.6 KiB
Go
92 lines
1.6 KiB
Go
package apiv1
|
|
|
|
// These structs are for the purpose of defining swagger HTTP responses
|
|
|
|
// Application information
|
|
// swagger:response InfoResponse
|
|
type infoResponse struct {
|
|
// Application information
|
|
Body appInformation
|
|
}
|
|
|
|
// Message summary
|
|
// swagger:response MessagesSummaryResponse
|
|
type messagesSummaryResponse struct {
|
|
// The message summary
|
|
// in: body
|
|
Body MessagesSummary
|
|
}
|
|
|
|
// Message headers
|
|
// swagger:model MessageHeaders
|
|
type messageHeaders map[string][]string
|
|
|
|
// Delete request
|
|
// swagger:model DeleteRequest
|
|
type deleteRequest struct {
|
|
// ids
|
|
// in:body
|
|
IDs []string `json:"ids"`
|
|
}
|
|
|
|
// Set read status request
|
|
// swagger:model SetReadStatusRequest
|
|
type setReadStatusRequest struct {
|
|
// Read status
|
|
Read bool `json:"read"`
|
|
|
|
// ids
|
|
// in:body
|
|
IDs []string `json:"ids"`
|
|
}
|
|
|
|
// Set tags request
|
|
// swagger:model SetTagsRequest
|
|
type setTagsRequest struct {
|
|
// Tags
|
|
// in:body
|
|
Tags []string `json:"tags"`
|
|
|
|
// IDs
|
|
// in:body
|
|
IDs []string `json:"ids"`
|
|
}
|
|
|
|
// Release request
|
|
// swagger:model ReleaseMessageRequest
|
|
type releaseMessageRequest struct {
|
|
// To
|
|
// in:body
|
|
To []string `json:"to"`
|
|
}
|
|
|
|
// Binary data reponse inherits the attachment's content type
|
|
// swagger:response BinaryResponse
|
|
type binaryResponse struct {
|
|
// in: body
|
|
Body string
|
|
}
|
|
|
|
// Plain text response
|
|
// swagger:response TextResponse
|
|
type textResponse struct {
|
|
// in: body
|
|
Body string
|
|
}
|
|
|
|
// Error reponse
|
|
// swagger:response ErrorResponse
|
|
type errorResponse struct {
|
|
// The error message
|
|
// in: body
|
|
Body string
|
|
}
|
|
|
|
// Plain text "ok" reponse
|
|
// swagger:response OKResponse
|
|
type okResponse struct {
|
|
// Default reponse
|
|
// in: body
|
|
Body string
|
|
}
|