1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-18 10:07: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

@@ -21,6 +21,7 @@ type Metadata struct {
Date time.Time
Subject string
Size int64
Seen bool
}
// Message holds both the metadata and content of a message.
@@ -109,3 +110,8 @@ func (d *Delivery) Size() int64 {
func (d *Delivery) Source() (io.ReadCloser, error) {
return ioutil.NopCloser(d.Reader), nil
}
// Seen getter.
func (d *Delivery) Seen() bool {
return d.Meta.Seen
}