memory

package
v0.16.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store is an in-memory mail store.

func NewStore

func NewStore() *Store

NewStore returns a new in-memory store.

func (*Store) Find

func (s *Store) Find(ctx context.Context, id uuid.UUID) (archive.Mail, error)

Find returns the archive.Mail with the given id.

func (*Store) Insert

func (s *Store) Insert(ctx context.Context, m archive.Mail) error

Insert inserts m into s.

func (*Store) Query

func (s *Store) Query(_ context.Context, q query.Query) (archive.Cursor, error)

Query returns a query.Cursor that returns the mails in the Store that match the query.Query q.

func (*Store) Remove

func (s *Store) Remove(_ context.Context, m archive.Mail) error

Remove removes the given archive.Mail m from the Store s.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL