aboutsummaryrefslogtreecommitdiff
path: root/models/models.go
blob: 00297e91f62649904baaa90b0c0612b35e3b7a39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package models

import (
	"io"
	"time"

	"github.com/emersion/go-imap"
	"github.com/emersion/go-message/mail"
)

// A MessageInfo holds information about the structure of a message
type MessageInfo struct {
	BodyStructure *imap.BodyStructure
	Envelope      *imap.Envelope
	Flags         []string
	InternalDate  time.Time
	RFC822Headers *mail.Header
	Size          uint32
	Uid           uint32
}

// A MessageBodyPart can be displayed in the message viewer
type MessageBodyPart struct {
	Reader io.Reader
	Uid    uint32
}

// A FullMessage is the entire message
type FullMessage struct {
	Reader io.Reader
	Uid    uint32
}