1package tui
2
3import "github.com/andrinoff/email-cli/fetcher"
4
5// A message to view an email.
6type ViewEmailMsg struct {
7 Index int
8}
9
10// A message to indicate that an email has been sent.
11type SendEmailMsg struct {
12 To string
13 Subject string
14 Body string
15}
16
17// A message to indicate that the user has entered their credentials.
18type Credentials struct {
19 Email string
20 Password string
21}
22
23// A message to indicate that the user has chosen a service.
24type ChooseServiceMsg struct {
25 Service string
26}
27
28// EmailResultMsg is sent after an email sending attempt.
29// If Err is not nil, the email failed to send.
30type EmailResultMsg struct {
31 Err error
32}
33
34// ClearStatusMsg is sent to clear the status message from the view.
35type ClearStatusMsg struct{}
36
37// A message containing the fetched emails.
38type EmailsFetchedMsg struct {
39 Emails []fetcher.Email
40}
41
42// A message to indicate that an error occurred while fetching emails.
43type FetchErr error
44
45// A message to navigate to the inbox view.
46type GoToInboxMsg struct{}
47
48// A message to navigate to the composer view.
49type GoToSendMsg struct{}