1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-18 01:57:02 +00:00

storage: Add Seen flag, tests for #58

This commit is contained in:
James Hillyerd
2018-03-31 21:46:10 -07:00
parent e3be5362dc
commit cc5cd7f9c3
8 changed files with 100 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ type Store interface {
AddMessage(message Message) (id string, err error)
GetMessage(mailbox, id string) (Message, error)
GetMessages(mailbox string) ([]Message, error)
MarkSeen(mailbox, id string) error
PurgeMessages(mailbox string) error
RemoveMessage(mailbox, id string) error
VisitMailboxes(f func([]Message) (cont bool)) error
@@ -43,6 +44,7 @@ type Message interface {
Subject() string
Source() (io.ReadCloser, error)
Size() int64
Seen() bool
}
// FromConfig creates an instance of the Store based on the provided configuration.