Documentation ¶
Index ¶
- func New(cfg config.Storage, extHost *extension.Host) (storage.Store, error)
- type Message
- func (m *Message) Date() time.Time
- func (m *Message) From() *mail.Address
- func (m *Message) ID() string
- func (m *Message) Mailbox() string
- func (m *Message) Seen() bool
- func (m *Message) Size() int64
- func (m *Message) Source() (io.ReadCloser, error)
- func (m *Message) Subject() string
- func (m *Message) To() []*mail.Address
- type Store
- func (s *Store) AddMessage(message storage.Message) (id string, err error)
- func (s *Store) GetMessage(mailbox, id string) (m storage.Message, err error)
- func (s *Store) GetMessages(mailbox string) (ms []storage.Message, err error)
- func (s *Store) MarkSeen(mailbox, id string) error
- func (s *Store) PurgeMessages(mailbox string) error
- func (s *Store) RemoveMessage(mailbox, id string) error
- func (s *Store) VisitMailboxes(f func([]storage.Message) (cont bool)) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
Message is a memory store message.
type Store ¶
Store implements an in-memory message store.
func (*Store) AddMessage ¶
AddMessage stores the message, message ID and Size will be ignored.
func (*Store) GetMessage ¶
GetMessage gets a mesage.
func (*Store) GetMessages ¶
GetMessages gets a list of messages.
func (*Store) PurgeMessages ¶
PurgeMessages deletes the contents of a mailbox.
func (*Store) RemoveMessage ¶
RemoveMessage deletes a single message.
Click to show internal directories.
Click to hide internal directories.