mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 09:37:02 +00:00
35 lines
1.1 KiB
Go
35 lines
1.1 KiB
Go
package webui
|
|
|
|
import "time"
|
|
|
|
// jsonMessage formats message data for the UI.
|
|
type jsonMessage struct {
|
|
Mailbox string `json:"mailbox"`
|
|
ID string `json:"id"`
|
|
From string `json:"from"`
|
|
To []string `json:"to"`
|
|
Subject string `json:"subject"`
|
|
Date time.Time `json:"date"`
|
|
PosixMillis int64 `json:"posix-millis"`
|
|
Size int64 `json:"size"`
|
|
Seen bool `json:"seen"`
|
|
Header map[string][]string `json:"header"`
|
|
Text string `json:"text"`
|
|
HTML string `json:"html"`
|
|
Attachments []*jsonAttachment `json:"attachments"`
|
|
Errors []*jsonMIMEError `json:"errors"`
|
|
}
|
|
|
|
// jsonAttachment formats attachment data for the UI.
|
|
type jsonAttachment struct {
|
|
ID string `json:"id"`
|
|
FileName string `json:"filename"`
|
|
ContentType string `json:"content-type"`
|
|
}
|
|
|
|
type jsonMIMEError struct {
|
|
Name string `json:"name"`
|
|
Detail string `json:"detail"`
|
|
Severe bool `json:"severe"`
|
|
}
|