1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 09:37:02 +00:00
Files
go-inbucket/pkg/webui/mailbox_json.go
2018-12-28 10:28:36 -08:00

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"`
}