aboutsummaryrefslogtreecommitdiff
path: root/models/models.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/models.go')
-rw-r--r--models/models.go32
1 files changed, 32 insertions, 0 deletions
diff --git a/models/models.go b/models/models.go
new file mode 100644
index 0000000..00297e9
--- /dev/null
+++ b/models/models.go
@@ -0,0 +1,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
+}