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

storage: Move NewMessage() into Store interface for #69

This commit is contained in:
James Hillyerd
2018-03-11 10:48:50 -07:00
parent d9b5e40c87
commit 137466f89b
7 changed files with 26 additions and 9 deletions

View File

@@ -28,12 +28,13 @@ type Store interface {
MailboxFor(emailAddress string) (Mailbox, error)
// LockFor is a temporary hack to fix #77 until Datastore revamp
LockFor(emailAddress string) (*sync.RWMutex, error)
// NewMessage is temproary until #69 MessageData refactor
NewMessage(mailbox string) (Message, error)
}
// Mailbox is an interface to get and manipulate messages in a DataStore
type Mailbox interface {
GetMessages() ([]Message, error)
NewMessage() (Message, error)
String() string
}