MailHog/vendor/github.com/mailhog/storage/storage.go

15 lines
381 B
Go
Raw Normal View History

2017-04-16 22:41:32 +00:00
package storage
import "github.com/mailhog/data"
// Storage represents a storage backend
type Storage interface {
Store(m *data.Message) (string, error)
List(start, limit int) (*data.Messages, error)
Search(kind, query string, start, limit int) (*data.Messages, int, error)
Count() int
DeleteOne(id string) error
DeleteAll() error
Load(id string) (*data.Message, error)
}