aboutsummaryrefslogtreecommitdiff
path: root/worker/types/messages.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-03-31 11:10:10 -0400
committerDrew DeVault <sir@cmpwn.com>2019-03-31 11:10:10 -0400
commit1f23868652a2ce0e81bddd048e3e828efaff2d69 (patch)
tree9d7fd0362d7b43df2d674ac2ad17b79e2c2196a9 /worker/types/messages.go
parent5d0402aeea1dcc69adb46227ab1cd73b5e768880 (diff)
Pull BodyStructure up from IMAP worker
Diffstat (limited to 'worker/types/messages.go')
-rw-r--r--worker/types/messages.go24
1 files changed, 19 insertions, 5 deletions
diff --git a/worker/types/messages.go b/worker/types/messages.go
index f38bb22..b1d1485 100644
--- a/worker/types/messages.go
+++ b/worker/types/messages.go
@@ -2,6 +2,7 @@ package types
import (
"crypto/x509"
+ "io"
"time"
"github.com/emersion/go-imap"
@@ -86,6 +87,12 @@ type FetchMessageBodies struct {
Uids imap.SeqSet
}
+type FetchMessageBodyPart struct {
+ Message
+ Uid uint32
+ Part int
+}
+
type DeleteMessages struct {
Message
Uids imap.SeqSet
@@ -120,11 +127,12 @@ type DirectoryContents struct {
type MessageInfo struct {
Message
- Envelope *imap.Envelope
- Flags []string
- InternalDate time.Time
- Size uint32
- Uid uint32
+ BodyStructure *imap.BodyStructure
+ Envelope *imap.Envelope
+ Flags []string
+ InternalDate time.Time
+ Size uint32
+ Uid uint32
}
type MessageBody struct {
@@ -133,6 +141,12 @@ type MessageBody struct {
Uid uint32
}
+type MessageBodyPart struct {
+ Message
+ Reader *io.Reader
+ Uid uint32
+}
+
type MessagesDeleted struct {
Message
Uids []uint32