messages.go

 1package tui
 2
 3import "github.com/andrinoff/email-cli/fetcher"
 4
 5// A message to tell the main model to switch to the inbox view.
 6type GoToInboxMsg struct{}
 7
 8// A message to tell the main model to switch to the composer view.
 9type GoToSendMsg struct{}
10
11// A message containing a fetched email to be viewed.
12type ViewEmailMsg struct {
13	Email fetcher.Email
14}
15
16// A message with the content of an email to be sent.
17type SendEmailMsg struct {
18	To      string
19	Subject string
20	Body    string
21}
22
23// A message to indicate that an email has been successfully sent.
24type EmailSentMsg struct{}