// Package apiv1 provides the API v1 endpoints for Mailpit. // // These structs are for the purpose of defining swagger HTTP parameters in go-swagger // in order to generate a spec file. They are lowercased to avoid exporting them as public types. // //nolint:unused package apiv1 import "github.com/axllent/mailpit/internal/smtpd/chaos" // swagger:parameters setChaosParams type setChaosParams struct { // in: body Body chaos.Triggers } // swagger:parameters AttachmentParams type attachmentParams struct { // Message database ID or "latest" // // in: path // required: true ID string // Attachment part ID // // in: path // required: true PartID string } // swagger:parameters DownloadRawParams type downloadRawParams struct { // Message database ID or "latest" // // in: path // required: true ID string } // swagger:parameters GetMessageParams type getMessageParams struct { // Message database ID or "latest" // // in: path // required: true ID string } // swagger:parameters GetHeadersParams type getHeadersParams struct { // Message database ID or "latest" // // in: path // required: true ID string } // swagger:parameters GetMessagesParams type getMessagesParams struct { // Pagination offset // // in: query // name: start // required: false // default: 0 // type: integer Start int `json:"start"` // Limit number of results // // in: query // name: limit // required: false // default: 50 // type: integer Limit int `json:"limit"` } // swagger:parameters SetReadStatusParams type setReadStatusParams struct { // in: body Body struct { // Read status // // required: false // default: false // example: true Read bool // Optional array of message database IDs // // required: false // default: [] // example: ["4oRBnPtCXgAqZniRhzLNmS", "hXayS6wnCgNnt6aFTvmOF6"] IDs []string // Optional messages matching a search // // required: false // example: tag:backups Search string } // Optional [timezone identifier](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) used only for `before:` & `after:` searches (eg: "Pacific/Auckland"). // // in: query // required: false // type string TZ string `json:"tz"` } // swagger:parameters DeleteMessagesParams type deleteMessagesParams struct { // Delete request // in: body Body struct { // Array of message database IDs // // required: false // example: ["4oRBnPtCXgAqZniRhzLNmS", "hXayS6wnCgNnt6aFTvmOF6"] IDs []string } } // swagger:parameters SearchParams type searchParams struct { // Search query // // in: query // required: true // type: string Query string `json:"query"` // Pagination offset // // in: query // required: false // default: 0 // type integer Start string `json:"start"` // Limit results // // in: query // required: false // default: 50 // type integer Limit string `json:"limit"` // Optional [timezone identifier](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) used only for `before:` & `after:` searches (eg: "Pacific/Auckland"). // // in: query // required: false // type string TZ string `json:"tz"` } // swagger:parameters DeleteSearchParams type deleteSearchParams struct { // Search query // // in: query // required: true // type: string Query string `json:"query"` // [Timezone identifier](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) used only for `before:` & `after:` searches (eg: "Pacific/Auckland"). // // in: query // required: false // type string TZ string `json:"tz"` } // swagger:parameters HTMLCheckParams type htmlCheckParams struct { // Message database ID or "latest" // // in: path // description: Message database ID or "latest" // required: true ID string } // swagger:parameters LinkCheckParams type linkCheckParams struct { // Message database ID or "latest" // // in: path // required: true ID string // Follow redirects // // in: query // required: false // default: false Follow string `json:"follow"` } // swagger:parameters ReleaseMessageParams type releaseMessageParams struct { // Message database ID // // in: path // description: Message database ID // required: true ID string // in: body Body struct { // Array of email addresses to relay the message to // // required: true // example: ["user1@example.com", "user2@example.com"] To []string } } // swagger:parameters SendMessageParams type sendMessageParams struct { // in: body // Body SendRequest Body struct { // "From" recipient // required: true From struct { // Optional name // example: John Doe Name string // Email address // example: john@example.com // required: true Email string } // "To" recipients To []struct { // Optional name // example: Jane Doe Name string // Email address // example: jane@example.com // required: true Email string } // Cc recipients Cc []struct { // Optional name // example: Manager Name string // Email address // example: manager@example.com // required: true Email string } // Bcc recipients email addresses only // example: ["jack@example.com"] Bcc []string // Optional Reply-To recipients ReplyTo []struct { // Optional name // example: Secretary Name string // Email address // example: secretary@example.com // required: true Email string } // Subject // example: Mailpit message via the HTTP API Subject string // Message body (text) // example: Mailpit is awesome! Text string // Message body (HTML) // example:
Mailpit is awesome!