memorystore

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Provider is the store provider name.
	Provider = "memory"
)

Functions

This section is empty.

Types

type Store

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

Store is the in-memory store and query repository implementation.

func New

func New(letters ...store.Letter) *Store

New creates a new in-memory store.

func (*Store) Get added in v0.5.0

func (s *Store) Get(ctx context.Context, id uuid.UUID) (store.Letter, error)

Get retrieves the letter with the given id from memory.

func (*Store) Insert

func (s *Store) Insert(ctx context.Context, let store.Letter) error

Insert puts a letter into the store.

func (*Store) Query

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

Query queries the store for letters.

Jump to

Keyboard shortcuts

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