1package tui
2
3import "github.com/andrinoff/email-cli/fetcher"
4
5type ViewEmailMsg struct {
6 Index int
7}
8
9type SendEmailMsg struct {
10 To string
11 Subject string
12 Body string
13 AttachmentPath string
14 InReplyTo string
15 References []string
16}
17
18type Credentials struct {
19 Provider string
20 Name string
21 Email string
22 Password string
23}
24
25type ChooseServiceMsg struct {
26 Service string
27}
28
29type EmailResultMsg struct {
30 Err error
31}
32
33type ClearStatusMsg struct{}
34
35type EmailsFetchedMsg struct {
36 Emails []fetcher.Email
37}
38
39type FetchErr error
40
41type GoToInboxMsg struct{}
42
43type GoToSendMsg struct {
44 To string
45 Subject string
46 Body string
47}
48
49type GoToSettingsMsg struct{}
50
51type FetchMoreEmailsMsg struct {
52 Offset uint32
53}
54
55type FetchingMoreEmailsMsg struct{}
56
57type EmailsAppendedMsg struct {
58 Emails []fetcher.Email
59}
60
61type ReplyToEmailMsg struct {
62 Email fetcher.Email
63}
64
65type SetComposerCursorToStartMsg struct{}
66
67type GoToFilePickerMsg struct{}
68
69type FileSelectedMsg struct {
70 Path string
71}
72
73type CancelFilePickerMsg struct{}
74
75type DeleteEmailMsg struct {
76 UID uint32
77}
78
79type ArchiveEmailMsg struct {
80 UID uint32
81}
82
83type EmailActionDoneMsg struct {
84 UID uint32
85 Err error
86}
87
88type GoToChoiceMenuMsg struct{}
89
90type DownloadAttachmentMsg struct {
91 Filename string
92 Data []byte
93}
94
95type AttachmentDownloadedMsg struct {
96 Path string
97 Err error
98}
99
100type RestoreViewMsg struct{}
101
102type BackToInboxMsg struct{}
103
104// --- Draft Messages ---
105
106// DiscardDraftMsg signals that a draft should be cached.
107type DiscardDraftMsg struct {
108 ComposerState *Composer
109}
110
111// RestoreDraftMsg signals that the cached draft should be restored.
112type RestoreDraftMsg struct{}