Debian Codegraph @

message_draft_types.go

raw
1 package proton
2
3 import (
4 "net/mail"
5
6 "github.com/ProtonMail/gluon/rfc822"
7 )
8
9 type DraftTemplate struct {
10 Subject string
11 Sender *mail.Address
12 ToList []*mail.Address
13 CCList []*mail.Address
14 BCCList []*mail.Address
15 Body string
16 MIMEType rfc822.MIMEType
17 Unread Bool
18
19 ExternalID string `json:",omitempty"`
20 }
21
22 type CreateDraftAction int
23
24 const (
25 ReplyAction CreateDraftAction = iota
26 ReplyAllAction
27 ForwardAction
28 AutoResponseAction
29 ReadReceiptAction
30 )
31
32 type CreateDraftReq struct {
33 Message DraftTemplate
34 AttachmentKeyPackets []string
35
36 ParentID string `json:",omitempty"`
37 Action CreateDraftAction
38 }
39
40 type UpdateDraftReq struct {
41 Message DraftTemplate
42 AttachmentKeyPackets []string
43 }